// Update is called once per frame void Update() { eventEmitter.Set3DAttributes(eventIndex, gameObject); if (shootWeapon) { playerWeapon.Shoot(cameraTransform.position, cameraTransform.forward); Debug.Log("Other Pew"); } if (!moving || !isGrounded) { ParticleSystem.EmissionModule em = particles.emission; em.enabled = false; } else { ParticleSystem.EmissionModule em = particles.emission; em.enabled = true; } if (move.magnitude != 0) { moving = true; if (isGrounded) { //Simular atraso dos passos stepTimer += Time.deltaTime; if (stepTimer >= stepTime) { eventEmitter.PlayEventInstance(eventIndex); stepTimer = 0f; } } else { //Forçar som de passo na volta do pulo stepTimer = 0.4f; } } }
// Update is called once per frame void Update() { eventEmitter.Set3DAttributes(eventIndex, gameObject); if (playerWeapon && shootWeapon) { playerWeapon.Shoot(cameraTransform.position, cameraTransform.forward); Debug.Log("Other Pew"); } if (!moving || !isGrounded) { ParticleSystem.EmissionModule em = particles.emission; em.enabled = false; } else { ParticleSystem.EmissionModule em = particles.emission; em.enabled = true; } }