Exemple #1
0
    void OverTile(Vector2Int location)
    {
        if (overTileFloorHUD != null)
        {
            Destroy(overTileFloorHUD);
        }
        if (aliveOutline != null)
        {
            aliveOutline.RemoveReference();
            aliveOutline = null;
        }
        if (location != Vector2Int.down)
        {
            overTileFloorHUD = CreateFloorHUD(location, Color.yellow);
            GetComponent <AudioSource>().PlayOneShot(overTileClip, 0.04f);
        }

        GChess t    = GridManager.instance.GetChess(location);
        GFloor f    = GridManager.instance.GetFloor(location);
        var    list = new List <IGetInfo>();

        if (t != null)
        {
            list.AddRange(t.GetInfos());
            aliveOutline = t.outline;
            aliveOutline.AddReference();
        }
        if (f != null)
        {
            list.AddRange(f.GetInfos());
        }
        list.AddRange(GridManager.instance.GetEnvironmentInformation(location));
        CreateMessage(list);
    }
    void OverTile(Vector2Int location)
    {
        if (overTileFloorHUD != null)
        {
            Destroy(overTileFloorHUD);
        }
        if (location != Vector2Int.down)
        {
            overTileFloorHUD = CreateFloorHUD(location, Color.yellow);
        }

        GChess t    = GridManager.instance.GetChess(location);
        var    list = new List <IGetInfo>();

        if (t != null)
        {
            list.AddRange(t.GetInfos());
        }
        list.AddRange(GridManager.instance.GetEnvironmentInformation(location));
        CreateMessage(list);
    }