<?xml version="1.0"?>
<ItemRenderer>
	<Data>
		<Sprite name="s_foot1" fileName="game/player_feet16.rttex" textureSize="32" frame="6,26" />
		<Sprite name="s_foot2" fileName="game/player_feet16.rttex" textureSize="32" frame="6,27" />
		<Sprite name="s_pogoStick" fileName="game/particles12.rttex" textureSize="32" frame="9,16" />
		<VariableMap>
			<Set name="ClothingOffsetFromShoes">0</Set>
			<Set name="poleScale">1,0.3,1</Set>
			<Set name="poleOffset">0,0,0</Set>
			<Set name="leftFootYPos">0,0,0</Set>
			<Set name="rightFootYPos">0,0,0</Set>
			<Set name="leftFoot">0</Set>
			<Set name="rightFoot">0</Set>
		</VariableMap>
		<Animations>
			<CurveAnimationFloat name="a_Offset" isLoop="true" animTime="700" playOnState="MotionY.No">
				<Curve name="ClothingOffsetFromShoes">
					<KeyFrame>0, 0</KeyFrame>
					<KeyFrame>0.07, 0</KeyFrame>
					<KeyFrame>0.25, -15</KeyFrame>
					<KeyFrame>0.5, -18</KeyFrame>
					<KeyFrame>0.75, -15</KeyFrame>
					<KeyFrame>0.93, 0</KeyFrame>
					<KeyFrame>1, 0</KeyFrame>
				</Curve>
			</CurveAnimationFloat>
			<CurveAnimationVec3 name="a_PoleScale" isLoop="true" animTime="700" playOnState="MotionY.No">
				<Curve name="poleScale">
					<KeyFrame>0, 1,0.2,1</KeyFrame>
					<KeyFrame>0.07, 1,0.2,1</KeyFrame>
					<KeyFrame>0.25, 1,0.4,1</KeyFrame>
					<KeyFrame>0.5, 1,0.4,1</KeyFrame>
					<KeyFrame>0.75, 1,0.4,1</KeyFrame>
					<KeyFrame>0.93, 1,0.2,1</KeyFrame>
					<KeyFrame>1, 1,0.2,1</KeyFrame>
				</Curve>
			</CurveAnimationVec3>
			<CurveAnimationVec3 name="a_PoleOffset" isLoop="true" animTime="700" playOnState="MotionY.No">
				<Curve name="poleOffset">
					<KeyFrame>0, 0,-1,0</KeyFrame>
					<KeyFrame>0.07, 0,-1,0</KeyFrame>
					<KeyFrame>0.25, 0,0,0</KeyFrame>
					<KeyFrame>0.5, 0,0,0</KeyFrame>
					<KeyFrame>0.75, 0,0,0</KeyFrame>
					<KeyFrame>0.93, 0,-1,0</KeyFrame>
					<KeyFrame>1, 0,-1,0</KeyFrame>
				</Curve>
			</CurveAnimationVec3>
			<CurveAnimationVec3 name="a_PoleScaleAir" isLoop="true" animTime="700" playOnState="MotionY.Yes">
				<Curve name="poleScale">
					<KeyFrame>0, 1,0.4,1</KeyFrame>
				</Curve>
			</CurveAnimationVec3>
			<CurveAnimationVec3 name="a_PoleScaleManne" isLoop="true" animTime="700" playOnState="MotionY.Mannequin">
				<Curve name="poleScale">
					<KeyFrame>0, 1,0.15,1</KeyFrame>
				</Curve>
			</CurveAnimationVec3>
			<CurveAnimationFloat name="a_OffsetAir" isLoop="true" animTime="700" playOnState="MotionY.Yes">
				<Curve name="ClothingOffsetFromShoes">
					<KeyFrame>0, 0</KeyFrame>
				</Curve>
			</CurveAnimationFloat>
			<CurveAnimationFloat name="a_LeftFoot" isLoop="true" animTime="700" playOnState="MotionY.No">
				<Curve name="leftFoot">
					<KeyFrame>0, -1</KeyFrame>
					<KeyFrame>0.07, -1</KeyFrame>
					<KeyFrame>0.25, 0</KeyFrame>
					<KeyFrame>0.5, 0</KeyFrame>
					<KeyFrame>0.75, 0</KeyFrame>
					<KeyFrame>0.93, -1</KeyFrame>
					<KeyFrame>1, -1</KeyFrame>
				</Curve>
			</CurveAnimationFloat>
			<CurveAnimationFloat name="a_RightFoot" isLoop="true" animTime="700" playOnState="MotionY.No">
				<Curve name="rightFoot">
					<KeyFrame>0, -1</KeyFrame>
					<KeyFrame>0.07, -1</KeyFrame>
					<KeyFrame>0.25, 0</KeyFrame>
					<KeyFrame>0.5, 0</KeyFrame>
					<KeyFrame>0.75, 0</KeyFrame>
					<KeyFrame>0.93, -1</KeyFrame>
					<KeyFrame>1, -1</KeyFrame>
				</Curve>
			</CurveAnimationFloat>
		</Animations>
		<StateMachines>
			<StateMachine name="MotionY">
				<States>
					<State name="No" />
					<State name="Yes" />
					<State name="Mannequin" />
				</States>
				<Transitions>
					<Transition to="No" from="Yes">
						<Condition type="and">
							<IsVariableFloat name="speed.y" operator="Less" abs="true">0.1</IsVariableFloat>
							<IsVariableBool name="isMannequin">false</IsVariableBool>
						</Condition>
					</Transition>
					<Transition to="Yes" from="No">
						<Condition type="and">
							<IsVariableFloat name="speed.y" operator="Greater" abs="true">0.1</IsVariableFloat>
							<IsVariableBool name="isMannequin">false</IsVariableBool>
						</Condition>
					</Transition>
					<Transition to="Mannequin" from="No|Yes">
						<Condition>
							<IsVariableBool name="isMannequin">true</IsVariableBool>
						</Condition>
					</Transition>
				</Transitions>
			</StateMachine>
		</StateMachines>
		<RenderOptions>
			<Default>
				<Set name="ClothingOffsetFromShoes">-5</Set>
				<Set name="UserNameOffset">14</Set>
				<Set name="IgnorePunchTypeCheck">true</Set>
			</Default>
		</RenderOptions>
	</Data>
	<RenderRules>
		<Update>
			<StopIf>
				<IsZombified>true</IsZombified>
        <IsSitting>true</IsSitting>
        <IsSleepingOnaBed>true</IsSleepingOnaBed>
			</StopIf>
			<AvatarTransform class="FootPosition">
				<Set name="foot1dy">leftFoot</Set>
				<Set name="foot2dy">rightFoot</Set>
				<Set name="foot1y">leftFoot</Set>
				<Set name="foot2y">rightFoot</Set>
			</AvatarTransform>
      <MusicSource onAction="JUMP">
        <Set name="MusicFile">audio/trampoline.wav</Set>
      </MusicSource>
		</Update>
		<RenderShoes>
			<Group>
				<Translate onState="MotionY.No">poleOffset</Translate>
				<Scale>poleScale</Scale>
				<SpriteRender name="s_pogoStick" offset="-4,0" alignment="UPPER_CENTER" />
				<SpriteRender name="s_pogoStick" offset="8,0" alignment="UPPER_CENTER" />
			</Group>
			<Group>
				<Translate>leftFootYPos</Translate>
				<SpriteRender name="s_foot1" alignment="DOWN_CENTER" />
			</Group>
			<Group>
				<Translate>rightFootYPos</Translate>
				<SpriteRender name="s_foot2" alignment="DOWN_CENTER" />
			</Group>
			<Group>
        <StopIf>
          <IsAction operatorType="Equal">BUILD</IsAction>
          <IsAction operatorType="Equal">PUNCH</IsAction>
          <IsVariableFloat name="speed.y" operator="Greater" abs="true">0.1</IsVariableFloat>
        </StopIf>
				<AvatarTransform class="ArmAngle">
					<Set name="armName">arm2Angle</Set>
					<Set name="armAngle">0</Set>
				</AvatarTransform>
				<AvatarTransform class="ArmAngle">
					<Set name="armName">arm1Angle</Set>
					<Set name="armAngle">0</Set>
				</AvatarTransform>
			</Group>
		</RenderShoes>
	</RenderRules>
</ItemRenderer>
