Пример #1
0
    public DamageSpawn()
    {
        AssetProxy prefabLoader = new AssetProxy(typeof(GameObject));
        GameObject buffPrefab   = prefabLoader.LoadAsset("Objects/Buffs/Damage.prefab");

        buffObject = Object.Instantiate(buffPrefab);
        DamageBuff healBuffScript = buffObject.GetComponent <DamageBuff>();

        healBuffScript.damage           = DAMAGE_UPGRADE_AMOUNT;
        buffObject.transform.localScale = new Vector3(0.25f, 0.25f, 0.25f);
    }
Пример #2
0
        public override bool ApplyEffect(Vector2 effectPosition)
        {
            List <Unit> units = ColliderManager.instance.ReturnUnitInRadius(effectPosition, Radius);

            for (int i = 0; i < units.Count; i++)
            {
                if (units[i].side == Faction.Player)
                {
                    DamageBuff buff = units[i].gameObject.AddComponent <DamageBuff>();
                    buff.BuffDamage = BuffDamage;
                    buff.StartEffect(DurationEffect);
                }
            }

            base.ApplyEffect(effectPosition);
            return(true);
        }