Пример #1
0
 public void Fall()
 {
     physState   = new FallingState(this, game);
     state       = new RightFallingTeno(game.level.teno, game);
     velocity.Y += ValueHolder.jumpingVelocity;
     state.Down();
 }
Пример #2
0
 public void Respawn()
 {
     state            = new RightIdleTeno(this, game);
     physState        = new VVVVVVGroundState(this, 1, game);
     gravityDirection = 1;
     position         = game.level.checkpoint;
 }
Пример #3
0
 public void Respawn()
 {
     state            = new RightIdleTS(this);
     physState        = new VVVVVVGroundState(this, 1);
     gravityDirection = 1;
     position         = Game1.GetInstance().level.checkpoint;
 }
Пример #4
0
 public Teno(Vector2 position)
 {
     state         = new RightIdleTS(this);
     physState     = new GroundState(this);
     this.position = position;
     factory       = new SpriteFactory();
 }
Пример #5
0
 public Teno(Vector2 position, Game1 game)
 {
     this.game     = game;
     state         = new RightIdleTeno(this, game);
     physState     = new GroundState(this, game);
     this.position = position;
     factory       = new SpriteFactory();
 }
Пример #6
0
 public void Update(GameTime gametime)
 {
     if (game.level.collision.standingBlock == null)
     {
         physState = new FallingState(this, game);
     }
     state.Update(gametime);
     physState.Update(gametime);
 }
Пример #7
0
 public void Jump()
 {
     if (velocity.Y > minVelocity.Y && !isFalling)
     {
         physState   = new JumpingState(this);
         velocity.Y -= ValueHolder.jumpingVelocity;
         state.Up();
     }
 }
Пример #8
0
 public void Jump()
 {
     if (velocity.Y > minVelocity.Y && !isFalling)
     {
         physState   = new JumpingState(this, game);
         state       = new RightJumpingTeno(game.level.teno, game);
         velocity.Y -= ValueHolder.jumpingVelocity;
         state.Up();
     }
 }