private void Update() { if (currentWeapon != null) { currentWeapon.MonoBehaviour.transform.localPosition = Vector3.zero; currentWeapon.MonoBehaviour.transform.localRotation = Quaternion.identity; } if (Input.GetButtonDown("Action")) { if (currentWeapon == null) { //punch } else { //shoot //possibly throw currentWeapon.Action(); } } if (Input.GetButtonDown("Throw")) { if (currentWeapon == null) { TryPickUp(); } else { Throw(); } } }
public void Attack() { Console.WriteLine(this.name + " begin Attack: "); implement.Action(); }
public void perFromWeapon() { Weapon.Action(); }
public void Action() { Console.Write("The name of the hero is " + this._nameHero + " and he "); _weapon.Action(); }