public void SetNothing() { _unitIndex = null; _tileSpriteRenderer.color = Color.white; _tileIndexType = TileIndexType.Nothing; SetTileTeamColor(); hasUnit = false; }
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; }
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); }