void OnMouseDown() { if (EventSystem.current.IsPointerOverGameObject()) { return; } if (turret != null) { BM.SelectNode(this); return; } if (!BM.CanBuild) { return; } BuildTurret(BM.GetTurretToBuild()); }
void OnMouseDown() { if (EventSystem.current.IsPointerOverGameObject()) { return; } if (turret != null) { BuildManager.SelectNode(this); return; } if (!BuildManager.CanBuild) { return; } //build a tower BuildTurret(BuildManager.GetTurretToBuild()); }