Ejemplo n.º 1
0
    public void SetNothing()
    {
        _unitIndex = null;
        _tileSpriteRenderer.color = Color.white;
        _tileIndexType            = TileIndexType.Nothing;
        SetTileTeamColor();

        hasUnit = false;
    }
Ejemplo n.º 2
0
    public void SetUnit(string _unitIdx, EnumInfo.TeamType _teamTy)
    {
        //UnitData _uniData= DataManager.Instance.GetUnitDataWithUnitIdx(_unitIdx);

        hasUnit = true;

        _unitIndex = UnitManager.Instance.CreateUnitWithUnitIdx(_unitIdx, this, _teamTy);
        _unitIndex.gameObject.SetActive(true);

        _unitIndex.SetTile(this);

        _tileSpriteRenderer.color = Color.black;

        _tileIndexType = TileIndexType.Unit;
    }
Ejemplo n.º 3
0
    public void SetUnit(Unit _unit)
    {
        _unitIndex = _unit;

        if (_unit == null)
        {
            _tileSpriteRenderer.color = Color.white;
        }
        else
        {
            _tileSpriteRenderer.color = Color.black;
        }

        _tileIndexType = TileIndexType.Unit;
        hasUnit        = true;

        _unit.SetTile(this);
    }