Exemple #1
0
    void Start()
    {
        if (!selectionSystem)
        {
            selectionSystem = selectionSystem = gameObject.AddComponent <BuildingSelectionSystem>();
        }

        //Calls whenever a building is selected from the UI.
        EventSystem.OnBuildingSelected += selectionSystem.EnableBuildingSelection;
        EventSystem.OnBuildingRemoval  += selectionSystem.EnableBuildingDeletion;
    }
Exemple #2
0
 private void OnValidate()
 {
     selectionSystem = GetComponentInChildren <BuildingSelectionSystem>();
 }