Beispiel #1
0
        protected override void OnInitialize()
        {
            this.properties = gameObject.GetComponent <PropertiesComponent>();
            this.behaviours = gameObject.GetComponent <BehavioursComponent>();

            HealthComponent.AnyEntityDamaged += OnAnyEntityDamaged;
        }
Beispiel #2
0
        protected override void OnInitialize()
        {
            Item.AnyItemStatsUpdated += OnAnyItemStatsUpdated;

            this.experience = GetComponent <ExperienceComponent>();
            this.inventory  = GetComponent <InventoryComponent>();
            this.attributes = GetComponent <AttributesComponent>();
            this.properties = GetComponent <PropertiesComponent>();
            this.behaviours = GetComponent <BehavioursComponent>();
            this.actor      = GetComponent <ActorComponent>();
        }
Beispiel #3
0
        public void SyncWith(BehavioursComponent behaviours)
        {
            foreach (var behaviour in behaviours.Behaviours)
            {
                if (GetStackCount(behaviour.Id) == 0)
                {
                    Apply(behaviour, behaviour.Caster);
                }

                Behaviours.First(b => b.Id == behaviour.Id).RemainingDuration = behaviour.RemainingDuration;
            }
        }
Beispiel #4
0
        protected override void OnInitialize()
        {
            Scenario.AnyScenarioExit += ScenarioOnAnyScenarioExit;

            this.actor     = GetComponent <ActorComponent>();
            this.resources = GetComponent <ResourcesComponent>();

            this.behaviours = GetComponent <BehavioursComponent>();
            this.behaviours.BehaviourApplied += OnBehaviourApplied;

            Episode.AnyEpisodeStarted += OnAnyEpisodeStarted;

            GetComponent <HealthComponent>().Died += OnEntityDied;
        }
Beispiel #5
0
        protected override void OnInitialize()
        {
            this.behaviours = GetComponent <BehavioursComponent>();

            if (Slots[0].Skill.IsEmpty())
            {
                PlaceOnActionBar(Slots[0], gameObject.IsCharacter() || CharacterManager.Instance.Character == null
                    ? GetDefaultWeaponSkill() : Skill.Empty);
            }

            if (Slots[1].Skill.IsEmpty())
            {
                PlaceOnActionBar(Slots[1], gameObject.IsCharacter() || CharacterManager.Instance.Character == null
                    ? GetDefaultWeaponSkill() : Skill.Empty);
            }

            CombatEncounter.AnyCombatRoundStarted += OnRoundStarted;
            Skill.AnySkillUsed += OnSkillUsed;
        }
Beispiel #6
0
        protected override void OnInitialize()
        {
            this.behaviours = GetComponent <BehavioursComponent>();

            Scenario.AnyScenarioExit += OnAnyScenarioExit;
        }