void Fire() { if (InputKeys.isDown(InputKeys.SHOOT) && equipped) { hitbox.enabled = true; em.enabled = true; audioTimer += Time.deltaTime; if (audioTimer >= timerRate) //will only send audio request every .25s. { audioTimer -= timerRate; audioManager.PlayLoopedSound("Flamethrower1"); print("TOLD MANAGER TO PLAY SOUND"); } } if (InputKeys.isPressed(InputKeys.SHOOT) && equipped) { hitbox.enabled = true; em.enabled = true; if (!firing) { firing = true; //audioManager.PlaySound("Flamethrower1"); } } }
// Update is called once per frame void Update() { if (Global.bossMedley) { position = size; } if (InputKeys.isPressed(InputKeys.SHOOT)) { position++; if (position < size) { UpdateText(); } } else if (Input.GetKeyDown(KeyCode.Space)) { { position = size; UpdateText(); } } if (position >= size) { if (part % 2 == 0) { SetActiveText(chatTest.returnChatByPart(part + 1)); stageManager.ChangeStage(gameObject, part / 2 + 1); gameObject.SetActive(false); } else { inventoryPanel.SetActive(true); } } }
private void SwapWeapon(Collider2D col) { if (InputKeys.isPressed(InputKeys.WEP1)) { SwapWeapon(0, col); } if (InputKeys.isPressed(InputKeys.WEP2)) { SwapWeapon(1, col); } }
void Fire() { if (InputKeys.isDown(InputKeys.SHOOT)) { hitbox.enabled = true; em.enabled = true; } if (InputKeys.isPressed(InputKeys.SHOOT)) { hitbox.enabled = true; em.enabled = true; if (!firing) { firing = true; audioManager.PlaySound("DarkWeapon"); } } }