コード例 #1
0
ファイル: Defender.cs プロジェクト: facybenbook/Cosmica
    public void DestroySelf()
    {
        DefenderTile currTile = GetCurrentTile();

        currTile.UpdateValidTileHighlight();
        currTile.RemoveHighlight();
        Destroy(gameObject);
    }
コード例 #2
0
    // When clicked, it calls OnMouseDown in the DefenderTile which this gameobject is a grandchild of
    // Workaround to a problem where not all the tile's region registers clicks (because this gameobject's collider is blocking them)
    private void OnMouseDown()
    {
        DefenderTile currTile = container.GetCurrentTile();

        currTile.OnMouseDown();
    }