예제 #1
0
 void OnGUI()
 {
     if (IsSelected)
     {
         EntityProperties[] entitiesAvailableOnThisUnit = EntitiesHolder.LoadEntitiesAvailableOnId(base.id);
         for (int i = 0; i < entitiesAvailableOnThisUnit.Length; i++)
         {
             EntityProperties current = entitiesAvailableOnThisUnit[i];
             if (GUI.Button(new Rect(0, 40 * i, 400, 40), current.Name + ", " + current.Description))
             {
                 BuildingPlacer.Create(current.Id);
             }
         }
     }
 }