override public void SetHex(Hex newHex) { if (Hex != null) { Hex.RemoveUnit(this); } base.SetHex(newHex); Hex.AddUnit(this); }
public void SetHex(Hex newHex) { Hex oldHex = Hex; if (Hex != null) { Hex.RemoveUnit(this); } Hex = newHex; Hex.AddUnit(this); if (OnUnitMoved != null) { OnUnitMoved(oldHex, newHex); } }