public void Thrown() { if (state == BossState.GRAB) { y = BOSS_START_Y; if (SCR_Profile.showTutorial == 1) { speedX = BOSS_TUTORIAL_SPEED_X * -direction; speedY = BOSS_TUTORIAL_SPEED_Y; } else { speedX = BOSS_THROWN_SPEED_X * -direction; speedY = BOSS_THROWN_SPEED_Y; } RandomRotate(); RandomFlyPose(); for (int i = 0; i < 3; i++) { moneyParticle[i].SetActive(true); } SCR_GrabbedSound.Stop(); SCR_Audio.PlayScreamSound(); } }
public void Grabbed() { if (state == BossState.TALK) { SwitchState(BossState.GRAB); talkBubble.SetActive(false); SCR_GrabbedSound.Play(); SCR_Audio.StopTalkSound(); } }
private void Awake() { if (instance == null) { instance = this; source = GetComponent <AudioSource>(); DontDestroyOnLoad(gameObject); if (SCR_Audio.LOAD_FROM_FILE == true) { instance.StartCoroutine(LoadFromFile()); } } else { Destroy(gameObject); } }