Ejemplo n.º 1
0
 public PlayerState(MonoBehaviour root)
     : base(new CombatInput(),
            new MovementInput(root,
                              SimpleJumpFactory.CreateJumpState(SimpleJumpFactory.JumpType.Single),
                              SimpleMovementFactory.CreateMovementState(SimpleMovementFactory.MovementTypes.OneAxis)))
 {
     //All players need this component attached.
     //root.gameObject.AddComponent<CharacterController>();
     //Debug.Assert(root.gameObject.GetComponent<CharacterController>() != null, "Character controller is not actually added.");
 }
 public PlayerInput()
 {
     jumpStates   = SimpleJumpFactory.CreatePlayerJumpStates();
     moveStates   = SimpleMovementFactory.CreatePlayerMoveStates();
     combatStates = SimpleCombatFactory.CreatePlayerCombatStates();
 }