示例#1
0
    public override void OnTurnEnd(HexBoardTile tile)
    {
        HexBoardTile runTile = tile.adjTiles[((int)Hexinal.E)];

        int failsafe = 0;

        while (failsafe < 50)
        {
            failsafe++;
            if (runTile == null)
            {
                return;
            }
            else if (runTile.ReadElementID() == -1)
            {
                BoardOS.AddToEndTurnUpdateQueue(runTile, laserGE.id);
                return;
            }
            else if (runTile.ReadElementID() == laserGE.id)
            {
                runTile = runTile.adjTiles[((int)Hexinal.E)];
            }
            else
            {
                return;
            }
        }
        Debug.Log("failsafe triggered");
    }
示例#2
0
    public override void OnTurnEnd(HexBoardTile tile)
    {
        List <HexBoardTile> visualUpdateTiles = new List <HexBoardTile>();
        HexBoardTile        eastTile          = tile.adjTiles[((int)Hexinal.E)];

        if (eastTile == null)
        {
            BoardOS.AddToEndTurnUpdateQueue(tile, -1);
        }
        else if (eastTile.ReadElementID() == -1)
        {
            BoardOS.AddToEndTurnUpdateQueue(tile, -1);
            BoardOS.AddToEndTurnUpdateQueue(eastTile, id);
        }
    }