コード例 #1
0
        public static void mineLevelChanged(object sender, WarpedEventArgs e)
        {
            if (e.NewLocation is MineShaft mine)
            {
                if (shouldUpdateAugment(e))
                {
                    if (TwitchIntergration.isConnected())
                    {
                        if (!TwitchIntergration.hasMinePollStarted)
                        {
                            TwitchIntergration.StartMinePoll(getRandomBuff(3));
                        }
                    }
                    else
                    {
                        AugmentOption aug = getRandomBuff(1)[0];
                        CurrentAugment = aug.id;
                        Game1.addHUDMessage(new HUDMessage(aug.DisplayName + ": " + aug.desc, null));
                    }
                }

                if (CurrentAugment != null)
                {
                    UpdateLocation(e);
                }
            }
        }
コード例 #2
0
ファイル: AugmentMenu.cs プロジェクト: Sogekeeper/ZODZ3
 public void PickAugment(AugmentOption optionPicked)
 {
     // resolve augment and close menu
     optionPicked.UpgradeMultipliers();
     playerCharacterSettings.augmentsPicked[mapIndex] = optionPicked;
     Time.timeScale = 1;
     gameObject.SetActive(false);
 }
コード例 #3
0
 public static AugmentOption[] getRandomBuff(int count)
 {
     List<AugmentOption> list = Enumerable.ToList(Augments.Values);
     List<AugmentOption> returnList = new List<AugmentOption>();
     while (returnList.Count < 3)
     {
         int num = Game1.random.Next(list.Count);
         AugmentOption item = list[num];
         if (item != null && !returnList.Contains(item))
             returnList.Add(item);
     }
     return returnList.ToArray();
 }
コード例 #4
0
 public void SetupAugmentMenuItem(AugmentOption augment, AugmentMenu menu)
 {
     targetAugment          = augment;
     buttonDescription.text = augment.augmentDescription;
     augmentMenu            = menu;
 }