public void OpenDoor() { DoorState = DOOR_STATE.DOOR_OPEN; DoorAudioSource.clip = DoorOpen; MiddleDoor.GetComponent <AudioSource>().Play(); MiddleDoor.GetComponent <Animation>().Play("DoorOpen"); }
public void SetData(CommonData.NOTE_LINE type) { Data = DataManager.Instance.DoorDataDic[PlayerData.Instance.GetUseSkin(CommonData.SKIN_TYPE.DOOR)]; NoteLineType = type; EffectPlay = false; DoorState = DOOR_STATE.NONE; SetDoorState(DOOR_STATE.CLOSE, false); }
public void SetDoorState(DOOR_STATE type, bool closeEffect = true) { if (EffectPlay) { if (closeEffect && type == DOOR_STATE.CLOSE) { SetCloseEffect(); SetCloseMsgEffect(); } return; } if (DoorState == type) { return; } DoorState = type; switch (DoorState) { case DOOR_STATE.CLOSE: DoorSprite.sprite = (Sprite)Resources.Load(Data.close_img, typeof(Sprite)); if (closeEffect) { SetCloseEffect(); SetCloseMsgEffect(); } break; case DOOR_STATE.HALF_OPEN: DoorSprite.sprite = (Sprite)Resources.Load(Data.halfopen_img, typeof(Sprite)); break; case DOOR_STATE.OPEN: DoorSprite.sprite = (Sprite)Resources.Load(Data.open_img, typeof(Sprite)); break; default: break; } }
// Start is called before the first frame update void Start() { ProgramMode = Program_Mode.START_SCREEN; DoorState = DOOR_STATE.DOOR_CLOSED; GamePlayState = GAMEPLAY_STATE.INIT; ReadingState = READING_STATE.NONE; DoorAudioSource = MiddleDoor.GetComponent <AudioSource>(); Lever.transform.parent.gameObject.SetActive(false); GM_AudioSource = GetComponent <AudioSource>(); OtherNotesProgressHash = 0; GameCompleteHash = (1 << (i32)Letter.Tag.OTHER_1) | (1 << (i32)Letter.Tag.OTHER_2) | (1 << (i32)Letter.Tag.OTHER_3) | (1 << (i32)Letter.Tag.OTHER_4); Human.SetActive(false); BlackScreen.SetActive(false); Credits.SetActive(false); GameMixer.GetFloat("GM_Volume", out VCR_Current_Volume); VCR_Target_Volume = VCR_Current_Volume; T = 0.0f; FirstCoffinActivated = false; SecondCoffinActivated = false; ThirdCoffinActivated = false; FirstCoffinLight.SetActive(false); SecondCoffinLight.SetActive(false); ThirdCoffinLight.SetActive(false); CoffinMinDistance = 14.0f; StartedAlready = false; #if IGNORED GameMixer.GetFloat("GM_Volume", out OriginalTrainVolume); GameMixer.SetFloat("GM_Volume", OriginalTorchSound); #endif }
public void CloseDoor() { DoorState = DOOR_STATE.DOOR_CLOSED; MiddleDoor.GetComponent <Animation>().Play("DoorClose"); StartCoroutine(PlayDoorCloseAudio()); }