IEnumerator FirstSound() { /*int ent = FirstDataGroup.GetEntitiesArray()[0]; * FirstDataHolderCmp dataHolderCmp = Storage.GetComponent<FirstDataHolderCmp>(ent); * dataHolderCmp.audioSource.PlayOneShot(dataHolderCmp.firstSteps, 1); * dataHolderCmp.audioSource.volume = 0; * float length = dataHolderCmp.firstSteps.length; * float volume_step = 1 / length; * * Stopwatch time = Stopwatch.StartNew(); * * while (time.Elapsed.Seconds < length) * { * dataHolderCmp.audioSource.volume += volume_step * Time.deltaTime; * yield return null; * } * dataHolderCmp.audioSource.PlayOneShot(dataHolderCmp.firstSteps, 1); * * time = Stopwatch.StartNew(); * * while (time.Elapsed.Seconds < length) * yield return null;*/ yield return(null); //Debug.Log("Send Signal"); //Debug.Log(); GlobalSystemStorage.Get <PanelProc>().StartAnim(); //SignalManager<StartGameSignal>.Instance.SendSignal(new StartGameSignal()); }
void StartPressButton(int button_sender) { int door = Storage.GetComponent <ButtonAnimCmp>(button_sender).doorHolder.GetComponent <EntityBase>().entity; if (Storage.ContainsComponent <StairDoorDownCmp>(door)) { GlobalSystemStorage.Get <LastRoomCompositionProc>().DeactivateComposition(); StairDoorDownCmp stairDoor = Storage.GetComponent <StairDoorDownCmp>(door); for (int i = 0; i < stairDoor.StairObj.Count; i++) { stairDoor.StairObj[i].SetActive(true); } } }
public override void StarterSetup() { //GlobalSystemStorage.Add<CursorProc>(); GlobalSystemStorage.Add <CorutineManager>(); //GlobalSystemStorage.Add<FirstProc>(); //GlobalSystemStorage.Add<PanelProc>(); GlobalSystemStorage.Add <MoveProc>(); //GlobalSystemStorage.Add<PressButtonProc>(); //GlobalSystemStorage.Add<CloseDoorProc>(); //GlobalSystemStorage.Add<DoorOCStateProc>(); //GlobalSystemStorage.Add<PedestalProc>(); //GlobalSystemStorage.Add<ShowTextProc>(); GlobalSystemStorage.Add <CameraProc>(); GlobalSystemStorage.Get <CameraProc>().need_camera = true; //CameraProc GlobalSystemStorage.Add <FPSControllerProc>(); //GlobalSystemStorage.Add<StepProc>(); //GlobalSystemStorage.Add<DoorSoundProc>(); //GlobalSystemStorage.Add<PressMidlleRoomButtonProc>(); //GlobalSystemStorage.Add<MidlleRoomProc>(); }