Пример #1
0
    public override GameObject Throw(Vector3 position, Vector3 direccion, SkillHandler handler, int owner, int team)
    {
        Vector3 pos = new Vector3();

        if (m_directionOffset)
        {
            pos = new Vector3(position.x + direccion.x * m_positionOffset.x, m_positionOffset.y, position.z + direccion.z * m_positionOffset.z);
        }
        else
        {
            pos = new Vector3(position.x, m_positionOffset.y, position.z);
        }

        GameObject go = Instantiate(this.gameObject, pos, this.transform.rotation);

        go.GetComponent <LightSkill2>().m_handler   = handler;
        go.GetComponent <LightSkill2>().m_direccion = direccion;
        go.GetComponent <LightSkill2>().m_skillId   = Random.Range(0, 10000);
        go.GetComponent <LightSkill2>().m_owner     = owner;
        go.GetComponent <LightSkill2>().m_team      = team;
        handler.gameObject.GetComponentInChildren <Animator>().SetTrigger("attack");

        if (handler.GetComponent <BuffLightSkill3>() != null)
        {
            go.GetComponent <LightSkill2>().m_particle.startSize *= m_lightMultiplier;
            go.GetComponent <LightSkill2>().m_particle.transform.GetChild(0).GetComponent <ParticleSystem>().startSize *= m_lightMultiplier;
            ParticleSystem.ShapeModule shapeModule = go.GetComponent <LightSkill2>().m_particle.transform.GetChild(0).GetComponent <ParticleSystem>().shape;
            shapeModule.radius *= m_lightMultiplier;
            go.GetComponent <LightSkill2>().m_particle.transform.GetChild(1).GetComponent <ParticleSystem>().startSize *= m_lightMultiplier;
            shapeModule         = go.GetComponent <LightSkill2>().m_particle.transform.GetChild(1).GetComponent <ParticleSystem>().shape;
            shapeModule.radius *= m_lightMultiplier;
            go.GetComponent <LightSkill2>().m_multiplier *= m_lightMultiplier;
        }
        return(go);
    }
 public override GameObject Throw(Vector3 position, Vector3 direccion, SkillHandler handler, int owner, int team)
 {
     if (handler.GetComponent <BuffLightSkill3>() != null)
     {
         Throw2(position, new Vector3(1f, 0, 0f), handler, owner, team);
         Throw2(position, new Vector3(1f, 0, -1f), handler, owner, team);
         Throw2(position, new Vector3(1f, 0, 1f), handler, owner, team);
         Throw2(position, new Vector3(0f, 0, 1f), handler, owner, team);
         Throw2(position, new Vector3(0f, 0, -1f), handler, owner, team);
         Throw2(position, new Vector3(-1f, 0, 1f), handler, owner, team);
         Throw2(position, new Vector3(-1f, 0, -1f), handler, owner, team);
         Throw2(position, new Vector3(-1f, 0, 0f), handler, owner, team);
     }
     else
     {
         Throw2(position, direccion, handler, owner, team);
     }
     return(null);
 }
Пример #3
0
 public float GetDamage()
 {
     return(m_multiplier * m_handler.GetComponent <PlayerStats>().strenght);
 }