Пример #1
0
    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);
    }
Пример #3
0
    public ScriptableBuff getAAb()
    {
        if (aab == null)
        {
            aab = (ScriptableBuff)ScriptableObject.CreateInstance("ScriptableAsheAABuff");
        }

        return(aab);
    }
Пример #4
0
    // void Start()
    // {
    //     ScriptableBuff slb = (ScriptableBuff)ScriptableObject.CreateInstance("ScriptableSlowBuff");

    // }
    public ScriptableBuff getSlb()
    {
        if (slb == null)
        {
            slb = (ScriptableBuff)ScriptableObject.CreateInstance("ScriptableSlowBuff");
        }

        return(slb);
    }
Пример #5
0
    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>();
 }
Пример #7
0
 public TimedHealthBuff(ScriptableBuff buff, GameObject obj) : base(buff, obj)
 {
     player = obj.GetComponent <PlayerController>();
 }
Пример #8
0
 public BuffContainer(float duration, ScriptableBuff buff, GameObject obj)
 {
     Duration = duration;
     Buff     = buff;
     Obj      = obj;
 }
Пример #9
0
 // 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;
 }
Пример #10
0
 public TimedShootSpeedBuff(ScriptableBuff buff, GameObject obj) : base(buff, obj)
 {
     playerWeapon = obj.GetComponentInChildren <Weapon>();
 }
Пример #11
0
 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;
 }
Пример #14
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;
 }