Ejemplo n.º 1
0
        // Start is called before the first frame update
        public void Launch() // Awake
        {
            PlayerVisuals playerVisuals = gameObject.GetComponent <PlayerVisuals>();

            #region player type
            switch (playerType)
            {
            case PlayerType.Human:
                player = new HumanPlayer(playerVisuals);
                break;

            case PlayerType.AI:
                player = new AI(playerVisuals);
                break;
            }
            player.Initialize();
            #endregion

            #region delegate functions
            onUpdate += player.OnUpdate;
            #endregion
        }
Ejemplo n.º 2
0
 public HumanPlayer(PlayerVisuals playerVisuals) : base(playerVisuals)
 {
 }
Ejemplo n.º 3
0
 public AbstractPalyer(PlayerVisuals playerVisuals)
 {
     this.playerVisuals = playerVisuals;
 }
Ejemplo n.º 4
0
 public AI(PlayerVisuals playerVisuals) : base(playerVisuals)
 {
 }