// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.F) && gm.Mario.isFlower) { fireball.Shoot(gameObject.GetComponent <hand>()); } }
void Update() { if (Input.GetKeyDown(KeyCode.RightShift) && player.isFlower) { FireBall ball = Instantiate(FireBall, gameObject.transform.position, gameObject.transform.rotation).GetComponent <FireBall>(); ball.timeInGame = Time.time + ball.lifeTime; ball.Shoot(); ball.rb.useGravity = true; } }