// ------------- Placeholder Control ------------- void SpawnInvalid() { if (!SpawnedPlaceholder) { return; } Destroy(this.Placeholder_Placement); this.Placeholder_Placement = Instantiate(this.Selected_Building.InvalidBuildObject); this.Placeholder_Placement.transform.parent = this.BuildCursor; this.Placeholder_Placement_Script = this.Placeholder_Placement.gameObject.GetComponent <BuildingPlaceholder>(); SpawnedPlaceholder = false; }
void SpawnValid() { if (SpawnedPlaceholder) { return; } if (this.Placeholder_Placement != null) { Destroy(this.Placeholder_Placement); } this.Placeholder_Placement = Instantiate(this.Selected_Building.PlaceHolder); this.Placeholder_Placement.transform.parent = this.BuildCursor; this.Placeholder_Placement_Script = this.Placeholder_Placement.gameObject.GetComponent <BuildingPlaceholder>(); SpawnedPlaceholder = true; }