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); }
public virtual void OnMMEvent(MMInventoryEvent inventoryEvent) { switch (inventoryEvent.InventoryEventType) { case MMInventoryEventType.Pick: if (inventoryEvent.EventItem.ItemClass == ItemClasses.Ammo) { RefreshCurrentAmmoAvailable(); } break; } }
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; } }
/// <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"); } } }