Exemple #1
0
 public void OnHexMouseEnter(MEHexEntry hexEntered)
 {
     if (Input.GetMouseButton(0))
     {
         meController.TerrainExtend(hexEntered);
     }
 }
Exemple #2
0
        //Cycle terrain values
        public void TerrainCycle(MEHexEntry hex)
        {
            int i = (int)hex.Terrain;

            i++;
            if (i > MEConfig.maxTerrainValue)
            {
                i = 0;
            }

            hex.Terrain = (Deft.Terrain)i;
        }
Exemple #3
0
 public void UnitCycle(MEHexEntry hex)
 {
     if (hex.Occupant == null)
     {
         hex.Occupant        = Instantiate(unit, HexVectorUtil.worldPositionOfHexCoord(hex.BoardPos), Quaternion.identity).GetComponent <MEUnitManager>();
         hex.Occupant.Player = 1;
         hex.Occupant.myHex  = hex;
     }
     else if (hex.Occupant.Player == 1)
     {
         hex.Occupant.Player = 2;
     }
     else if (hex.Occupant.Player == 2)
     {
         Destroy(hex.Occupant.gameObject);
         hex.Occupant = null;
     }
 }
Exemple #4
0
 public void DeleteHex(MEHexEntry hex)
 {
     Destroy(hex.HexManager.gameObject);
     HexGrid.Remove(hex.BoardPos);
 }
Exemple #5
0
 public void TerrainExtend(MEHexEntry hex)
 {
     hex.Terrain = extensionTerrainType;
 }
Exemple #6
0
 public void SetExtensionTerrain(MEHexEntry hex)
 {
     extensionTerrainType = hex.Terrain;
 }
Exemple #7
0
 public void OnUnitDown(MEHexEntry unitDown)
 {
     meController.UnitCycle(unitDown);
 }
Exemple #8
0
 public void OnHexDown(MEHexEntry hexDown)
 {
     meController.SetExtensionTerrain(hexDown);
 }
Exemple #9
0
 public void OnHexClick(MEHexEntry hexClicked)
 {
     meController.TerrainCycle(hexClicked);
 }
Exemple #10
0
 public void OnHexMouseFour(MEHexEntry hexClicked)
 {
     meController.DeleteHex(hexClicked);
 }