示例#1
0
    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();
    }
示例#2
0
    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();
    }