コード例 #1
0
        public void RemoveASkill(int skillID)
        {
            if (SkillDeck.Count == 0)
            {
                SkillDeck        = SkillDiscardPile;
                SkillDiscardPile = new List <int>();
            }
            int r = SkillDeck.Count.Random();

            SkillHashes.Insert(0, SkillDeck[r]);
            SkillDeck.RemoveAt(r);
            SkillDiscardPile.Add(SkillHashes[skillID + 1]);
            SkillHashes.RemoveAt(skillID + 1);
            ssAnimEvent?.Invoke(ssAnimDuration);
            //Debug.Log("skill: " + SkillDiscardPile[SkillDiscardPile.Count - 1] + " was removed");
        }
コード例 #2
0
        public void ShiftASkill()
        {
            if (SkillDeck.Count == 0)
            {
                SkillDeck        = SkillDiscardPile;
                SkillDiscardPile = new List <int>();
            }

            int r = SkillDeck.Count.Random();

            SkillHashes.Insert(0, SkillDeck[r]);
            ssAnimEvent?.Invoke(ssAnimDuration);
            SkillDeck.RemoveAt(r);
            if (SkillHashes.Count <= defaultSkillCount)
            {
                return;
            }

            SkillDiscardPile.Add(SkillHashes[defaultSkillCount]);
            SkillHashes.RemoveAt(defaultSkillCount);
            //Debug.Log("skill: " + SkillDiscardPile[SkillDiscardPile.Count - 1] + " was shifted");
        }
コード例 #3
0
 public void AddASkillToMind(int insertID, int skillHash)
 {
     SkillHashes.Insert(insertID, skillHash);
     SkillHashes.RemoveAt(defaultSkillCount);
 }