コード例 #1
0
 public void Initialize(ComponentContainer components)
 {
     if (Randomly.TrueFalse())
     {
         bondedFamiliar = this.familiars.ChooseOne();
         components.Add(bondedFamiliar);
     }
     else
     {
         bondedItem = this.items.ChooseOne();
         components.Get <Inventory>().EquipItem(bondedItem);
     }
 }
コード例 #2
0
        private bool ChoosesPositiveEnergy(CharacterAlignment alignment)
        {
            if (alignment.IsGood())
            {
                return(true);
            }

            if (alignment.IsEvil())
            {
                return(false);
            }

            return(Randomly.TrueFalse());
        }