// Use this for initialization void Start() { _controller = GetComponent<CharacterController>(); GameObject gameControllerObj = GameObject.FindGameObjectsWithTag( "GameController" )[0]; _gameController = gameControllerObj.GetComponent(typeof(GameStateController)) as GameStateController; _state = State.ALIVE; _sprite = animatedPlane.GetComponent(typeof(AnimationController)) as AnimationController; }
public static GameStateController get() { if (_instance == null) { Logger.Log("GameStateController::get was badly initialized", Logger.Level.WARN); _instance = GameObject.Find(gameObjectName).GetComponent<GameStateController>(); } return _instance; }
// Use this for initialization void Start() { GameObject gameControllerObj = GameObject.FindGameObjectsWithTag( "GameController" )[0]; _gameController = gameControllerObj.GetComponent(typeof(GameStateController)) as GameStateController; _gameController.SlowTime(timeSlowDuration, timeSlowRate); CameraController camera = _gameController.LevelCamera.GetComponent(typeof(CameraController)) as CameraController; Vector3 planePosition = transform.position; planePosition.z += 3; planePosition.y += 1f; Instantiate(explosionPlane, planePosition, transform.rotation); }
void Start() { puzzleGen = GeneratingPuzzle.Instance; gameStateController = GameStateController.Instance; //inputHandler = InputHandler.Instance; scanUnitARR = new ScanUnit[puzzleGen._columns, puzzleGen._rows]; _unitCounter = 0; _unitTypeCheckContainer = new List<int>(); _score = 0; _turnText.text = puzzleGen._turns.ToString(); _1starPoint = puzzleGen._1starPoint; _2starPoint = puzzleGen._2starPoint; _3starPoint = puzzleGen._3starPoint; _scoreSlider.minValue = 0; _scoreSlider.maxValue = _1starPoint; _scoreSlider.value = 0; }
private int EventNumber; // Event index on path public void SetGameStateController(GameStateController controller) // Set GameStateController reference { this.stateController = controller; }
public override void press() { Logger.Log("ModalRestart::press()", Logger.Level.INFO); GameStateController.restart(); }
void Awake() { if (instance == null){ instance = this; } }
private IEnumerator WaitToMoveOn() { yield return(new WaitForSeconds(5f)); // A few seconds so all players can see GameStateController.FindInScene().SetToState(GameStateController.GameState.OnWrapUpScreen); }
// Use this for initialization void Start() { gamestate = GameObject.Find("GameState").GetComponent <GameStateController>(); StartCoroutine(WaitToBeDestroyable()); audio = GetComponent <AudioSource>(); }
// Constructor public ConfirmState(GameStateController _controller, float _timeToGoBack) : base(_controller, _timeToGoBack) { GameState = Extension.GameState.ConfirmState; timeToGoBackToMainMenu = _timeToGoBack; }
void OnDestroy() { GameStateController.DeregisterFieldView(); }
// Constructor public IGameState(GameStateController _controller, float _timeToGoBack) { gameStateController = _controller; timeToGoBackToMainMenu = _timeToGoBack; }
public void setGameController(GameStateController gsc) { gameStateController = gsc; }
// Use this for initialization void Start() { controller = GameObject.Find("GameStateController").GetComponent <GameStateController>(); controller.CallStateEvent("BattleStart"); }
void Awake() { instance = this; m_evtCtx = new GameEventContext(); }
public override void press() { Logger.Log("QuitModalWindow::press()", Logger.Level.INFO); GameStateController.get().tryUnlockPause(); ModalManager.unsetModal(); }
private void OnTriggerEnter2D(Collider2D other) { GameStateController.ExitGame(); GameStateController.ReloadScene(); }
private void OnCollisionEnter2D(Collision2D other) { GameStateController.ExitGame(); GameStateController.ReloadScene(); }
// Called when the game state changes. protected void OnGameStateChanged(GameStateController.State state) { if (state == GameStateController.State.Lost) { Invoke("Show", delay); } }
// Use this for initialization void Start() { if (_instance == null) { _instance = this; } if (_instance != this) { Debug.Log ("Duplicate GameStateController detected, destroying."); Destroy (this); } }
// Use this for initialization void Start () { gameStateController = FindObjectOfType<GameStateController> (); suspicionMeter = FindObjectOfType<SuspicionMeter> (); angerBar = FindObjectOfType<AngerBar> (); }
public abstract void Act(GameStateController controller);
private void Start() { _mainCamera = Camera.main; _gameStateController = FindObjectOfType <GameStateController>(); }
private void Start() { GetComponent <Button>().onClick.AddListener(onButtonClick); sessionManager = Service.Get <SessionManager>(); gameStateController = Service.Get <GameStateController>(); }
void OnApplicationQuit() { GameStateController.SaveData(); }
void Start() { GameObject[] trolls = GameObject.FindGameObjectsWithTag("Troll"); trollsAlive = trolls.Length; gameMaster = (GameStateController)GameObject.FindObjectOfType(typeof(GameStateController)); }
private void Start() { controller = GameObject.FindObjectOfType <GameStateController>(); smash = GetComponent <AudioSource>(); }
private void Awake() { instance = this; }
void Start() { player = new Player( SetCurrentTargetSpell, SetCurrentPositionSpell, SetCursor ); entityController = new EntityController( player, redMainTarget, blueMainPosition.gameObject.transform.position, buildViewPresenter ); gameStateController = new GameStateController( entityController, _UpdateWaveTimer ); }
public void GoToMainMenu() { GameStateController.PerformTransition(nextState); }
// Callback that is invoked when the game state changes. protected void OnGameStateChanged(GameStateController.State state) { // stop playing sound effects when the game is over if (state != GameStateController.State.Playing) { _source.Stop(); } }
public void RestartGame() { GameStateController.ClearState(); GameStateController.SetState(GameState.StartGame); GameObject.DestroyImmediate(gameObject);//close self }
public override void Init(GameStateController gSC) { base.Init(gSC); //yield break; }
// Use this for initialization void Start() { modalPannel.SetActive(false); gameState = GameStateController.gameStateController; }
public void Initialze() { mCamController = new CameraController(); mGameStateController = new GameStateController(); }
private void Awake() { eventDispatcher = Service.Get <EventDispatcher>(); gameStateController = Service.Get <GameStateController>(); }
public GameStateController() : base() { instance = this; }
// Start is called before the first frame update void Start() { GSC = FindObjectOfType <GameStateController>(); }
// Called before start private void Awake() { gameStateController = FindObjectOfType <GameStateController>(); }
// Use this for initialization void Start() { gamesStateController = FindObjectOfType <GameStateController>(); }