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); }
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); }