Пример #1
0
 public CharacterContext(Direction dir, PositionState posState, State state, VulnState vulnState, int remainingJumps)
 {
     this.remainingJumps = remainingJumps;
     this.dir            = dir;
     this.posState       = posState;
     this.state          = state;
     this.vulnState      = vulnState;
 }
Пример #2
0
 protected void Init()
 {
     health         = maxHealth;
     jumpsRemaining = numAirJumps;
     direction      = Direction.Right;
     state          = State.Free;
     vulnState      = VulnState.Neutral;
     positionState  = PositionState.Grounded;
     UpdateAvailableActions();
     currentAction = GetAction();
     velocity      = new Vector2();
     StartCoroutine("Act");
     StartCoroutine("AerialMovement");
 }