Ejemplo n.º 1
0
    /// <summary>
    /// Moves into a tile, and takes control. Assumes tile is unoccupied.
    /// </summary>
    /// <param name="hexTile"></param>
    public void Sieze(GameObject hexTile)
    {
        HexEntity entity = hexTile.GetComponent <HexEntity>();

        Global.MapFlyWeight.TransferHexOwner(hexTile, Controller);
        entity.UpdateController(Controller);
        entity.army = gameObject;

        //Play the movement sound
        GameObject      AudioObj = GameObject.Find("AudioManagerGame");
        ArbitrarySounds sounds   = AudioObj.GetComponentInChildren <ArbitrarySounds>();

        sounds.OnArmyMove();
    }