public void TryActive(uint id, GameObject target = null) { if (target != null) { TowerHit hit = null; this._data.TryGetValue(id, out hit); if (hit != null) { hit.TryActive(target); } } }
public void TryActive(uint id, GameObject target = null) { if (target == null) { return; } TowerHit towerHit = null; this._data.TryGetValue(id, ref towerHit); if (towerHit != null) { towerHit.TryActive(target); } }