コード例 #1
0
 public override bool Use()
 {
     base.Use();
     MMInventoryEvent.Trigger(MMInventoryEventType.InventoryCloseRequest, null, this.name, null, 0, 0);
     MMTimeScaleEvent.Trigger(MMTimeScaleMethods.For, TimeSpeed, Duration, true, 5f, false);
     return(true);
 }
コード例 #2
0
 public virtual void OnMMEvent(MMInventoryEvent inventoryEvent)
 {
     switch (inventoryEvent.InventoryEventType)
     {
     case MMInventoryEventType.Pick:
         if (inventoryEvent.EventItem.ItemClass == ItemClasses.Ammo)
         {
             RefreshCurrentAmmoAvailable();
         }
         break;
     }
 }
コード例 #3
0
 public void OnMMEvent(MMInventoryEvent eventType)
 {
     if (eventType.InventoryEventType == MMInventoryEventType.InventoryOpens)
     {
         buttonUi.SetActive(false);
     }
     else if (eventType.InventoryEventType == MMInventoryEventType.InventoryCloses)
     {
         buttonUi.SetActive(true);
         BattleInput._canCheckPartyMembers = true;
     }
 }
コード例 #4
0
 /// <summary>
 /// On Inventory events, we unlock or add progress to achievements if needed
 /// </summary>
 /// <param name="inventoryEvent"></param>
 public virtual void OnMMEvent(MMInventoryEvent inventoryEvent)
 {
     if (inventoryEvent.InventoryEventType == MMInventoryEventType.Pick)
     {
         if (inventoryEvent.EventItem.ItemID == "KoalaCoin")
         {
             MMAchievementManager.AddProgress("MoneyMoneyMoney", 1);
         }
         if (inventoryEvent.EventItem.ItemID == "KoalaHealth")
         {
             MMAchievementManager.UnlockAchievement("Medic");
         }
     }
 }