Пример #1
0
        public Character(string sprite)
            : base(sprite)
        {
            //TODO: Be a bit more creative than this
            Speed = 130;

            CharacterStats = new CharacterStatCollection(this);

            // Allocate just enough room for equipment
            var numberOfEquipmentSlots = Enum.GetNames(typeof(EquipmentSlot)).Length;
            Equipment = new Equipment[numberOfEquipmentSlots];

            CharacterStats[StatTypes.Hitpoints].CurrentValueChanged += OnHitpointsChanged;

            Skills = new List<Skill>();
            ActiveStatusEffects = new StatusEffectCollection();
        }
Пример #2
0
 protected override void OnInitialize()
 {
     base.OnInitialize();
     AttributesComponent = this.GetDependency<AttributesComponent>();
     _StatusEffects = new StatusEffectCollection();
 }
Пример #3
0
 protected override void OnInitialize()
 {
     base.OnInitialize();
     AttributesComponent = this.GetDependency <AttributesComponent>();
     _StatusEffects      = new StatusEffectCollection();
 }