public override void Affect(BasicAffectable other) { foreach (IEffect effect in this._effects) { effect.Affect(other); } }
public virtual void Affect(BasicAffectable other) { if (this.Effect != null) { this.Effect.Affect(other); } else { Debug.LogWarning($"{this.name}: has no effects?"); } if (this.OnAffect != null) { this.OnAffect.Invoke(other); } }
private void OnEnable() { if (this.Subject == null) { if (this.TryGetComponent(out Transform subject)) { Debug.LogWarning($"{this.name}: monitor subject missing!"); this.Subject = subject; } else { Debug.LogError($"{this.name}: can't find monitor subject!"); } } this._player = this.Subject.GetComponent <Player>(); this._affectable = this.Subject.GetComponent <BasicAffectable>(); }
public override void Affect(BasicAffectable other) { other.GetComponent <Mover>().Speed *= this.SpeedMultiplier; }
public override void Affect(BasicAffectable other) { Debug.Log($"{this.name}: InteractedBy {other.name}"); }
public override void Affect(BasicAffectable other) { this.gameObject.SetActive(false); base.Affect(other); }
public override void Affect(BasicAffectable other) { this._amin.SetTrigger("Press"); }
public override void Affect(BasicAffectable other) { this.SwapControls(other.GetComponent <InputProcessor>().ActionKeyCodes); }
public abstract void Affect(BasicAffectable other);