Beispiel #1
0
    public void reset()
    {
        Instance                      = this;
        terrainPrefabList             = new List <GameObject>();
        terrainType                   = new int[width, height];
        arrPosX                       = new float[width, height];
        arrPosY                       = new float[width, height];
        terrains                      = new GameObject[width, height];
        gridHolder                    = new GameObject();
        gridHolder.transform.position = new Vector3(-1f, 0.5f, 0);
        tileIndexXDic                 = new Dictionary <string, int>();
        tileIndexYDic                 = new Dictionary <string, int>();
        soldier1Dic                   = new Dictionary <string, GameObject>();
        soldier2Dic                   = new Dictionary <string, GameObject>();
        unitPosXIndex                 = new Dictionary <string, int>();
        unitPosYIndex                 = new Dictionary <string, int>();
        tileObjectByIndex             = new Dictionary <string, GameObject>();
        soldierAlign                  = new Dictionary <string, int>();
        soldierType                   = new Dictionary <string, int>();
        turn = 0;

        player1BlackTiles = new Dictionary <string, GameObject>();
        player2BlackTiles = new Dictionary <string, GameObject>();
        playerAlignScript = playerController.GetComponent <PlayerAlign>();

        mouseControllerScript = mouseController.GetComponent <MouseController>();
    }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     totalUnitNum      = 0;
     playerAlignScript = PlayerController.GetComponent <PlayerAlign>();
     m_player1         = playerAlignScript.m_Player1;
     m_player2         = playerAlignScript.m_Player2;
 }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     selectedUnitObject  = new GameObject();
     selectedUnitName    = " ";
     soldierActionScript = soldierActionController.GetComponent <SoldierActions>();
     playerScript        = GameObject.Find("Players").GetComponent <PlayerAlign>();
     player1             = playerScript.m_Player1;
     player2             = playerScript.m_Player2;
 }