コード例 #1
0
 public void setAction(BubbleAction action, bool negated)
 {
     this.action = action;
     this.negated = negated;
     switch (action)
     {
         case BubbleAction.Wardrobe:
             Animation = "wardrobe";
             break;
         case BubbleAction.Portrait:
             Animation = "portrait";
             break;
         case BubbleAction.OldPortrait:
             Animation = "oldportrait";
             break;
         case BubbleAction.Push:
             Animation = "push";
             break;
         case BubbleAction.Chair:
             Animation = "chair";
             break;
         case BubbleAction.Stair:
             Animation = "stair";
             break;
         case BubbleAction.Bookcase:
             Animation = "bookcase";
             break;
         default:
             Animation = "negate";
             break;
     }
 }
コード例 #2
0
    void  Action()
    {
        GameObject   action      = GameObject.Find("WallSpawner");
        BubbleAction consequence = action.GetComponent <BubbleAction> ();

        if (!wasCorrect)
        {
            consequence.Punish();
        }
        else
        {
            GameObject[] allTrash = GameObject.FindGameObjectsWithTag("Trash");
            GameObject[] allOil   = GameObject.FindGameObjectsWithTag("Oil");

            if (allTrash.Count() >= 10)
            {
                consequence.Reward(allTrash);
            }
            else if (allOil.Count() >= 5)
            {
                consequence.Reward(allOil, "Oil");
            }
            else
            {
                TroutControl.healFish();
            }
        }
    }
コード例 #3
0
 public ActionBubble()
 {
     this.sheet = sheetMan.getSheet("action");
     this.action = BubbleAction.None;
     visible = false;
     negated = false;
     if (sheet.hasAnimation("negate"))
     {
         negateInd = sheet.getAnimation("negate").First();
     }
 }