public void AddBuff(ScriptableBuff scriptableBuff) { Buff buff = scriptableBuff.InitializeBuff(gameObject); buff.Activate(); activeBuffs.Add(buff); }
private void applyAsheAA() { GameObject buff = GameObject.Find("Buffs"); ScriptableBuff ab = buff.GetComponent <Buffs>().getAAb(); AsheAABuff aab = (AsheAABuff)ab.InitializeBuff(player); player.GetComponent <BuffableEntity>().AddBuff(aab); }
public ScriptableBuff getAAb() { if (aab == null) { aab = (ScriptableBuff)ScriptableObject.CreateInstance("ScriptableAsheAABuff"); } return(aab); }
// void Start() // { // ScriptableBuff slb = (ScriptableBuff)ScriptableObject.CreateInstance("ScriptableSlowBuff"); // } public ScriptableBuff getSlb() { if (slb == null) { slb = (ScriptableBuff)ScriptableObject.CreateInstance("ScriptableSlowBuff"); } return(slb); }
private void applySlow(GameObject obj) { if (!frostOn) { return; } GameObject buff = GameObject.Find("Buffs"); ScriptableBuff sb = buff.GetComponent <Buffs>().getSlb(); SlowBuff slb = (SlowBuff)sb.InitializeBuff(obj); obj.GetComponent <BuffableEntity>().AddBuff(slb); }
public TimedSpeedBuff(ScriptableBuff buff, GameObject obj) : base(buff, obj) { //Getting MovementComponent, replace with your own implementation _movementComponent = obj.GetComponent <MovementComponent>(); }
public TimedHealthBuff(ScriptableBuff buff, GameObject obj) : base(buff, obj) { player = obj.GetComponent <PlayerController>(); }
public BuffContainer(float duration, ScriptableBuff buff, GameObject obj) { Duration = duration; Buff = buff; Obj = obj; }
// private int maxStack =3; // private int currStack = 0; public SlowBuff(ScriptableBuff buff, GameObject obj) : base(buff, obj) { Duration = 0f; nvm = obj.GetComponent <NavMeshAgent>(); EffectStacks = 0; }
public TimedShootSpeedBuff(ScriptableBuff buff, GameObject obj) : base(buff, obj) { playerWeapon = obj.GetComponentInChildren <Weapon>(); }
public TimedBuff(ScriptableBuff buff, GameObject obj) { Buff = buff; Obj = obj; }
public TimedSpeedBuff(float duration, ScriptableBuff buff, GameObject obj) : base(duration, buff, obj) { //Getting MovementComponent, replace with your own implementation movementComponent = obj.GetComponent <MovementComponent>(); speedBuff = (ScriptableSpeedBuff)buff; }
public AsheAABuff(ScriptableBuff buff, GameObject obj) : base(buff, obj) { Duration = 0f; EffectStacks = 0; }
public TimedSpeedBuff(ScriptableBuff buff, GameObject obj) : base(buff, obj) { //Getting MovementComponent, replace with your own implementation player = obj.GetComponent <PlayerController>(); }
public TimedBuff(float duration, ScriptableBuff buff, GameObject obj) { this.duration = duration; this.buff = buff; this.obj = obj; }