Beispiel #1
0
 public void Fall()
 {
     physState   = new FallingState(this, game);
     state       = new RightFallingTeno(game.level.teno, game);
     velocity.Y += ValueHolder.jumpingVelocity;
     state.Down();
 }
Beispiel #2
0
 public void Respawn()
 {
     state            = new RightIdleTeno(this, game);
     physState        = new VVVVVVGroundState(this, 1, game);
     gravityDirection = 1;
     position         = game.level.checkpoint;
 }
Beispiel #3
0
 public void Respawn()
 {
     state            = new RightIdleTS(this);
     physState        = new VVVVVVGroundState(this, 1);
     gravityDirection = 1;
     position         = Game1.GetInstance().level.checkpoint;
 }
Beispiel #4
0
 public Teno(Vector2 position)
 {
     state         = new RightIdleTS(this);
     physState     = new GroundState(this);
     this.position = position;
     factory       = new SpriteFactory();
 }
Beispiel #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();
 }
Beispiel #6
0
 public TrasitionGameState(Teno teno, ITenoState prevState, ITenoState newState, Game1 game)
 {
     this.game      = game;
     this.teno      = teno;
     this.prevState = prevState;
     this.newState  = newState;
     currentState   = prevState;
 }
Beispiel #7
0
 public TrasitionGameState(Teno teno, ITenoState prevState, ITenoState newState)
 {
     game           = Game1.GetInstance();
     this.teno      = teno;
     this.prevState = prevState;
     this.newState  = newState;
     currentState   = prevState;
 }
Beispiel #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();
     }
 }
Beispiel #9
0
 public void TransitionState(ITenoState prevState, ITenoState newState)
 {
     game.gameState = new TrasitionGameState(this, prevState, newState, game);
 }
Beispiel #10
0
 public void MakeDeadTeno()
 {
     state = new DeadTeno(this, game);
 }