protected override void OnInitialize() { this.properties = gameObject.GetComponent <PropertiesComponent>(); this.behaviours = gameObject.GetComponent <BehavioursComponent>(); HealthComponent.AnyEntityDamaged += OnAnyEntityDamaged; }
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>(); }
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; } }
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; }
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; }
protected override void OnInitialize() { this.behaviours = GetComponent <BehavioursComponent>(); Scenario.AnyScenarioExit += OnAnyScenarioExit; }