protected override void OnInitialize() { base.OnInitialize(); if (this.Manager.Items.ContainsKey("BPMManager")) { bpmManager = this.Manager.Items["BPMManager"] as BPMManager; } }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); } else { instance = this; DontDestroyOnLoad(this.gameObject); } }
private void Awake() { if (BPMManagerInstance != null && BPMManagerInstance != this) { Destroy(this.gameObject); } else { BPMManagerInstance = this; DontDestroyOnLoad(this.gameObject); } }
public FlowScriptManager(PPDDevice device, ISound sound) { priorityManagers = new List <IPriorityManager>(); engine = new Engine(); engine.Error += engine_Error; BPMManager = new BPMManager(); UpdateManager = new UpdateManager(engine); CalculatePositionManager = new CalculatePositionManager(engine); ProcessEvaluateManager = new ProcessEvaluateManager(engine); CreateMarkManager = new CreateMarkManager(engine); ProcessMarkBPMManager = new ProcessMarkBPMManager(engine); ProcessMissPressManager = new ProcessMissPressManager(engine); ProcessAllowedButtonsManager = new ProcessAllowedButtonsManager(engine); InputManager = new InputManager(); PauseManager = new PauseManager(engine); priorityManagers.AddRange(new IPriorityManager[] { UpdateManager, CalculatePositionManager, ProcessEvaluateManager, CreateMarkManager, ProcessMarkBPMManager, ProcessMissPressManager, ProcessAllowedButtonsManager, }); GameResultManager = new GameResultManager(); StageManager = new StageManager(device); afterLoadList = new Dictionary <string, object>(); scriptList = new List <KeyValuePair <MemoryStream, ScriptInfo> >(); ModManager.Instance.WaitForLoadFinish(); if (!ModManager.Instance.Initialized) { ModManager.Instance.EnumerateClasses(); } if (PPDSetting.Setting.IsDebug && TcpDebugControllerBase.IsListening()) { debugController = new DebugController(); controllerClient = new TcpDebugControllerClient(debugController); try { controllerClient.Create(); } catch { MessageBox.Show("Failed to create debug connection"); debugController = null; controllerClient = null; } } }
void Awake() { //Instance trick, allow only one instance. if (instance == null) { instance = this; } else { Destroy(this); } //Register global time event. if (GlobalTimerEvent == null) { GlobalTimerEvent = new UnityEvent(); } //Start the timer. StartCoroutine(GlobalTimer(BPMRate)); }
// Start is called before the first frame update void Start() { taps = new List <float>(); game = GameObject.Find("RunGame"); BPMManager = GameObject.Find("BPMManager").GetComponent <BPMManager>(); }