public override void onSet(Tom.FacingState facingState) { base.onSet(facingState); tom.CharFix.Body.BodyType = BodyType.Kinematic; tom.CharFix.Body.LinearVelocity = Vector2.Zero; tom.CharFix.Body.AngularVelocity = 0; animationLeft.activeFrameNumber = 0; animationRight.activeFrameNumber = 0; moves.push(new Move.Move(tom, new Vector2(0, -300), 3000)); }
public override void onSet(Tom.FacingState facingState) { base.onSet(facingState); tom.CharFix.Body.BodyType = BodyType.Kinematic; tom.CharFix.Body.LinearVelocity = Vector2.Zero; tom.CharFix.Body.AngularVelocity = 0; animationLeft.activeFrameNumber = 0; animationRight.activeFrameNumber = 0; if (tom.Facing == Tom.FacingState.Right) { moves.push(new Move.Move(tom, new Vector2(110, 0), 500)); moves.push(new Move.Move(tom, new Vector2(110, -145), 600)); } else { moves.push(new Move.Move(tom, new Vector2(-110, 0), 500)); moves.push(new Move.Move(tom, new Vector2(-110, -142), 600)); } }