public void Add(Behaviour behaviour) { var item = Instantiate(this.behaviourPrefab, this.behaviourContainer); item.Initialize(behaviour); this.behaviourViews.Add(item); }
private void OnBehaviourApplied(Behaviour behaviour) { if (this.behaviours.IsImmobilized || this.behaviours.IsUncontrollable) { Stop(); } }
private void OnBehaviourRemoved(Behaviour behaviour) { View.SetPoisoned(this.behaviours.IsPoisoned); if (!behaviour.IsHidden) { View.RemoveBehaviour(behaviour); } }
private void OnAnyBehaviourAppliedOrRemoved(Behaviour behaviour) { if (Slot.Skill.Caster != behaviour.Target) { return; } MaybeMarkAsUnavailable(); }
private void OnBehaviourApplied(Behaviour behaviour) { View.SetPoisoned(this.behaviours.IsPoisoned); if (!behaviour.IsHidden) { View.AddBehaviour(behaviour); } }
private void OnBehaviourApplied(Behaviour behaviour) { if (!this.behaviours.IsUncontrollable && !this.behaviours.IsImmobilized) { return; } this.path.Clear(); this.mover.Stop(); }
public Food(FoodData data, Behaviour behaviour) { Id = data.Id; Name = I18N.Instance.Get(data.NameKey); Description = I18N.Instance.Get(data.DescriptionKey); Type = data.Type; Icon = data.Icon; Price = data.Price; Behaviour = behaviour; }
public Relic(RelicData data, Rarity rarity, Behaviour behaviour) { Id = data.Id; Name = I18N.Instance.Get(data.NameKey); Description = I18N.Instance.Get(data.DescriptionKey); Lore = I18N.Instance.Get(data.LoreKey); Icon = data.Icon; Rarity = rarity; Behaviour = behaviour; }
public Talent(TalentData data, Behaviour behaviour, TalentCategory category) { Id = data.Id; Tier = data.Tier; Index = data.Index; Name = I18N.Instance.Get(data.NameKey); Description = I18N.Instance.Get(data.DescriptionKey); Icon = data.Icon; Behaviour = behaviour; Category = category; }
public void Initialize(Behaviour behaviour) { Behaviour = behaviour; Behaviour.RemainingDurationChanged += OnDurationChanged; Behaviour.StackCountChanged += OnStackCountChanged; OnDurationChanged(behaviour); OnStackCountChanged(behaviour); this.image.sprite = Resources.Load <Sprite>(behaviour.Icon); this.background.color = behaviour.IsHarmful ? new Color(0.4f, 0, 0) : new Color(0, 0.4f, 0); }
private void OnAnyBehaviourApplied(Behaviour behaviour) { if (!behaviour.Target.GetComponent <BehavioursComponent>().IsUncontrollable) { return; } Timer.Instance.WaitForEndOfFrame(() => { SkillQueue.Clear(behaviour.Target); MaybeEndTurn(behaviour.Target); }); }
public void Remove(Behaviour behaviour) { var behaviourView = this.behaviourViews.Find(item => item.Behaviour.Equals(behaviour)); if (behaviourView == null) { return; } behaviourView.Terminate(); Destroy(behaviourView.gameObject); this.behaviourViews.Remove(behaviourView); }
private void OnStackCountChanged(Behaviour behaviour) { this.stackText.text = behaviour.StackCount < 2 ? "" : $"x{behaviour.StackCount}"; }
public void Construct(Behaviour behaviour) { this.behaviour = behaviour; this.text.text = behaviour.Name; }
private void OnDurationChanged(Behaviour behaviour) { this.durationText.text = behaviour.RemainingDuration > 0 ? behaviour.RemainingDuration.ToString() : ""; }
public void RemoveBehaviour(Behaviour behaviour) { this.behaviourFrame.Remove(behaviour); }
public void AddBehaviour(Behaviour behaviour) { this.behaviourFrame.Add(behaviour); }