Ejemplo n.º 1
0
    public void CmdGenerateLeapKnockback(Quaternion rotation)
    {
        GameObject temp    = (GameObject)GameObject.Instantiate(leapKnockbackHurtbox, transform.position, rotation);
        HurtBox    hurtBox = temp.GetComponent <HurtBox> ();

        hurtBox.AddAlreadyHit(this.gameObject.GetComponent <LiveEntity> ());
        NetworkServer.Spawn(temp);
    }
Ejemplo n.º 2
0
    public void CmdGenerateChargedAttack(float size)
    {
        GameObject temp    = (GameObject)GameObject.Instantiate(chargeAttack, transform.position, Quaternion.identity);
        HurtBox    hurtBox = temp.GetComponent <HurtBox> ();

        hurtBox.damage = 20;
        hurtBox.AddAlreadyHit(this.gameObject.GetComponent <LiveEntity> ());
        temp.GetComponent <SphereCollider> ().radius = size;
        NetworkServer.Spawn(temp);
    }