public virtual bool _Load(String path) { if (_data != null) { return(false); } _data = BBGame.Game().LoadData(path); if (_data == null) { return(false); } _length = _data.Length; return(true); }
void Start() { game = gameRunner.getFocusedGame(); if (game == null) { SceneManager.LoadScene(Constants.SCENE_TITLE); return; } PRNG prng = new ParkMiller(game.GameID); PregeneratedRandomValues = new List <float>(); for (int i = 0; i < 1000; i++) { PregeneratedRandomValues.Add(prng.next()); } queue = new Queue <BBGameState>(); queue = new Queue <BBGameState>(); game.OnUpdateReady += LogUpdate; ReadyToProcessNewPlay = true; historicalPlaybackCurrentIndex = game.isRunning ? -1 : 0; currentState = game.GetUpdate(historicalPlaybackCurrentIndex); if (currentState != null) { queue.Enqueue(currentState); } HandleTechnicalDifficulties(null); if (game.isRunning) { Debug.Log("Rewind Off"); cameraGraphicsMasterControl.DisableRewind(); } else { Debug.Log("Rewind On"); cameraGraphicsMasterControl.EnableRewind(); cameraGraphicsMasterControl.rewindPanel.OnChanged += RewindToPoint; } }
public virtual bool Open(String path, String mode) { if (_stream != null) { return(false); } FileMode fmode = 0; if (mode == "r") { fmode = FileMode.Open; } else if (mode == "w") { fmode = FileMode.Create; } else if (mode == "u") { fmode = FileMode.OpenOrCreate; } else { return(false); } _stream = BBGame.Game().OpenFile(path, fmode); if (_stream == null) { return(false); } _position = _stream.Position; _length = _stream.Length; return(true); }
public BBGame() { _game=this; _debugExs=(MonkeyConfig.CONFIG=="debug"); _stopwatch=Stopwatch.StartNew(); }
public BBGame() { _game = this; _debugExs = (CerberusConfig.CONFIG == "debug"); _stopwatch = Stopwatch.StartNew(); }