private void ShootSecondary() { if (mana.mana < manaSecondary) { return; } mana.UseMana(manaSecondary); GameObject grenadeInstance = Instantiate(grenade, bulletSpawn.position, Quaternion.identity); Rigidbody2D grenRigidBody = grenadeInstance.GetComponent <Rigidbody2D>(); grenRigidBody.velocity = transform.TransformDirection(bulletSpawn.transform.right * throwForce); }
//减少当前角色的魔法值 public void DecreaseMP() { playerMana.UseMana(this.skillInfo.intMP); }