Пример #1
0
        protected override void OnInitialize()
        {
            base.OnInitialize();

            if (this.Manager.Items.ContainsKey("BPMManager"))
            {
                bpmManager = this.Manager.Items["BPMManager"] as BPMManager;
            }
        }
Пример #2
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
 }
Пример #3
0
 private void Awake()
 {
     if (BPMManagerInstance != null && BPMManagerInstance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         BPMManagerInstance = this;
         DontDestroyOnLoad(this.gameObject);
     }
 }
Пример #4
0
        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;
                }
            }
        }
Пример #5
0
    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));
    }
Пример #6
0
 // Start is called before the first frame update
 void Start()
 {
     taps       = new List <float>();
     game       = GameObject.Find("RunGame");
     BPMManager = GameObject.Find("BPMManager").GetComponent <BPMManager>();
 }