Exemplo n.º 1
0
 void Start()
 {
     grid = FindObjectOfType<GridManager>().Grid;
     currentNode = grid[rowStart, colStart];
     currentNode.Owner = this;
     transform.position = currentNode.transform.position;
     hand = new Hand();
     //state machine init
     machine = new PlayerStateMachine();
     renderTimer = 0;
     invunTimer = 0;
 }
Exemplo n.º 2
0
        void Start()
        {
            //should find players provided they are named in the fashion: "Player 1" or "Player 42"
            player = GameObject.Find("Player " + ++playerIndex).GetComponent<Player.Player>();

            deck = player.Deck;
            selectionOptions = new Hand();
            selectedCards = new Hand();

            selectionButtons = new Toggle[NUM_SELECTIONS];
            GameObject[] gos = GameObject.FindGameObjectsWithTag("Selection").OrderBy(go => go.name).ToArray();
            for(int i = 0; i < gos.Length; i++)
            {
                selectionButtons[i] = gos[i].GetComponent<Toggle>();
            }
            DrawPossibleSelections();
        }
Exemplo n.º 3
0
 void Start()
 {
     grid = FindObjectOfType<GridManager>().Grid;
     currentNode = grid[rowStart, colStart];
     currentNode.Owner = this;
     transform.position = currentNode.transform.position;
     deck = new Deck(FindObjectOfType<CardList>().Cards);
     hand = new Hand();
     //state machine init
     machine = new PlayerStateMachine();
     doState = new state[] { Idle, MoveBegining, MoveEnding, Hit, Dead, BasicAttack, Sword };
     renderTimer = 0;
     invunTimer = 0;
 }