コード例 #1
0
 // If not occupies, opens a build menu
 void OnMouseDown()
 {
     if (!HouseManager.houses.ContainsKey(gridIndex))
     {
         BuildMenu.Open(this);
     }
 }
コード例 #2
0
ファイル: House.cs プロジェクト: connellyj/HousingCrisis
 // When clicked, opens a menu or heals the house
 void OnMouseDown()
 {
     if (burnState <= 0 && !isSmoking)
     {
         // display build options
         if (type == HouseManager.HouseType.HOUSE ||
             type == HouseManager.HouseType.STORE)
         {
             BuildMenu.Open(this);
         }
     }
     else
     {
         // put out fire
         HealHouse(healingPerTap);
     }
 }