public override void Do() { GameObject area = Instantiate(Prefabs.Instance.area, owner.transform.position, Quaternion.identity, owner.transform); AreaBehavior areaBehavior = area.GetComponent <AreaBehavior>(); areaBehavior.radius = radius; areaBehavior.damage = damage; areaBehavior.owner = owner; areaBehavior.delay = delay; areaBehavior.buff = gainBuff; areaBehavior.Init(); }
void Shoot(Vector2 pos) { GameObject area = Instantiate(Prefabs.Instance.area, targetPos, Quaternion.identity, null); AreaBehavior areaBehavior = area.GetComponent <AreaBehavior>(); areaBehavior.radius = radius; areaBehavior.damage = damage; areaBehavior.owner = owner; areaBehavior.delay = delay; areaBehavior.buff = gainBuff; areaBehavior.Init(); }