void Update() { if (SelectionBox != null) { SelectionBox.SetActive(IsSelected); } if (Task != null && Task.IsComplete) { Task = null; } if (this.UseMouseLeftRelease()) { if (this.IsPointedAt()) { if (Scene.Main.UnitInterface.Unit == null || !Scene.Main.UnitInterface.Unit.IsPointedAt() || (this.HasComponent <Motile>() && !Scene.Main.UnitInterface.Unit.HasComponent <Motile>())) { Scene.Main.UnitInterface.Unit = this; } } } }