// Use this for initialization void Start() { _livesLeft = LIVES; _ball = GameObject.Find("Ball"); _ballController = _ball.GetComponent<BallController>(); _globalObject = GameObject.Find("Global Controller"); _globalController = _globalObject.GetComponent<GlobalController>(); }
// Use this for initialization void Start() { _invisible = false; _mainCollider = GetComponent<BoxCollider>(); Screen.showCursor = false; _globalObj = GameObject.Find("Global Controller"); _globalController = _globalObj.GetComponent<GlobalController>(); _ball = GameObject.Find("Ball"); _ballController = _ball.GetComponent<BallController>(); }
void Awake() { if (instance != null && instance != this) { isSetToDestroy = true; Destroy(gameObject); } else { instance = this; } eventRegistery = GetComponentInChildren<EventRegistery>(); saveFile = GetComponentInChildren<SaveFile>(); systemFile = GetComponentInChildren<SystemFile>(); dataFile = GetComponentInChildren<DataFile>(); transitionery = GetComponentInChildren<TransitionManager>(); view = GetComponentInChildren<GlobalView>(); }
public static void SetUp() { GlobalController.test = true; GlobalController.Initialize(); }
public static void BeforeEveryTest() { GlobalController.test = true; GlobalController.Initialize(); }
protected void SaveObjectState() { GlobalController.SavePersistentObject(this.MakeSerialized()); }
// Use this for initialization void Start() { globalController = GameObject.FindGameObjectWithTag(TagNames.GlobalController).GetComponent <GlobalController>(); }
public void MovePlayerToEffectPoint() { GlobalController.MovePlayerTo(effectPoint.position); }
public void ExitSlowMotion() { GlobalController.ExitSlowMotion(); }
public void FlashWhite() { GlobalController.FlashWhite(); }
void Awake() { pGlobal = this; }
public override void OnPlayerEnter() { GlobalController.LoadScene(sceneToLoad, beacon: beacon); }
public void SetGlobalController(GlobalController glob) { globalController = glob; }
private void Update() { if (doTheCleanup) { var clientDictionary = ClientScene.objects; GameObject playerOne = null; GameObject playerTwo = null; foreach (var item in clientDictionary) { Debug.Log("Key: " + item.Key + " Value: " + item.Value); if (item.Value.name.Equals("Player1") || item.Value.name.Equals("player1(Clone)")) { playerOne = item.Value.gameObject; } if (item.Value.name.Equals("Player2") || item.Value.name.Equals("player2(Clone)")) { playerTwo = item.Value.gameObject; } } var playerScriptOne = (TriggerScript)playerOne.GetComponent <TriggerScript>(); playerScriptOne.DoTheCleanup(); var playerScriptTwo = (TriggerScript)playerTwo.GetComponent <TriggerScript>(); playerScriptTwo.DoTheCleanup(); doTheCleanup = false; } if (globalController == null && ClientScene.objects.Count != 0) { globalController = (GlobalController)GameObject.Find("GlobalControllerGameObject").GetComponent <GlobalController>(); } if (ClientScene.objects.Count == 4 && !firstCheck) { var clientDictionary = ClientScene.objects; GameObject playerOne = null; GameObject playerTwo = null; foreach (var item in clientDictionary) { //Debug.Log("Key: " + item.Key + " Value: " + item.Value); if (item.Value.name.Equals("Player1") || item.Value.name.Equals("player1(Clone)")) { playerOne = item.Value.gameObject; } if (item.Value.name.Equals("Player2") || item.Value.name.Equals("player2(Clone)")) { playerTwo = item.Value.gameObject; } } var playerScriptOne = (TriggerScript)playerOne.GetComponent <TriggerScript>(); playerScriptOne.ThisIsYourGlobal(globalController); var playerScriptTwo = (TriggerScript)playerTwo.GetComponent <TriggerScript>(); playerScriptTwo.ThisIsYourGlobal(globalController); globalController.ClientCheckedInTrigger(); globalController.ClientCheckedInTrigger(); firstCheck = true; } }
public void QuitGame() { GlobalController.SaveFile(); Application.Quit(); }
public void NewGame() { GlobalController.currentLevel = 0; GlobalController.SaveFile(); SceneManager.LoadScene("TalkingScene"); }
override public void Activate() { GlobalController.SaveGame(true); }
int tmp = 0; //used to manipulate velocity void Start() { gc = FindObjectOfType <GlobalController>(); obj = GetComponent <BaseObject>(); rb = GetComponent <Rigidbody2D>(); }
public void CutsceneCallback() { GlobalController.CutsceneCallback(); }
override protected bool Check() { return(GlobalController.HasState(state)); }
public void EnterSlowMotion() { GlobalController.EnterSlowMotion(); }
public override void OnPlayerEnter() { GlobalController.ShowTitleText(title, subtitle); }
public void ShowTitle(string text) { string[] splitText = text.Split('/'); GlobalController.ShowTitleText(splitText[0], splitText[1]); }
public void SetGlobalControllerRef(GlobalController global, WinningOptions opts) { globalController = global; winOpts = opts; }
public void GameFlag(GameFlag flag) { GlobalController.AddGameFlag(flag); }
void ClosePage() { gameObject.SetActive(false); GlobalController.setState(GameState.GS_STARTMENU); }
protected SerializedPersistentObject LoadObjectState() { return(GlobalController.GetPersistentObject(GetID())); }
// Use this for initialization void Start() { MyGlobalController = GameObject.Find("GlobalController").GetComponent <GlobalController>(); MyGlobalController.MyGridControllerScript.StartMe(); }
public static void AfterEveryTest() { SqliteConnection.ClearAllPools(); GlobalController.DropAll(); }
private void Awake() { gc = FindObjectOfType <GlobalController>(); }
public static void SetDefaultUser(this GlobalController controller) { controller.CurrentCedUser = new CedUser(new UserEntity { Email = "*****@*****.**" }, new List <RoleEntity>()); }
public void LoadScene(string sceneName) { GlobalController.LoadScene(sceneName); }
public static void DepartWithPlayer() { GlobalController.LoadSceneWithSubway(GetStopScene(destination)); }
// Use this for initialization void Start() { currentScore = GameObject.Find("CurrentScore").GetComponent<CurrentScore>(); fullScore = GameObject.FindObjectOfType<FullScore>(); score = GetComponent<Score>(); energy = GetComponent<Energy>(); energyLine = GameObject.FindObjectOfType<EnergyLine>(); inputController = GameObject.FindObjectOfType<InputController>(); timerScript = GameObject.FindObjectOfType<TimerScript>(); timerUI = GameObject.FindObjectOfType<TimerUI>(); info = GetComponent<Info>(); taskStrings = GetComponent<TaskStrings>(); pauseButton = GameObject.FindObjectOfType<PauseButton>().gameObject; pauseMenu = GameObject.Find("Canvas").GetComponentInChildren<PauseMenu>(); // endMenu = GameObject.FindObjectOfType<EndMenu>(); taskHelper = GameObject.FindObjectOfType<TaskHelper>(); globalController = GetComponent<GlobalController>(); cam = GameObject.Find("MainCamera"); secondCamera = GameObject.Find("SecondCamera"); wordRideCanvas = GameObject.FindObjectOfType<WordRideCanvas>(); metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject; carUserParametres = GetComponent<CarUserParametres>(); gameUI = GameObject.FindObjectOfType<GameUI>(); canvasController = GameObject.FindObjectOfType<CanvasController>(); particleCanvas = GameObject.Find("ParticleCanvas"); carCreator = GameObject.FindObjectOfType<CarCreator>(); mainBonus = GameObject.FindObjectOfType<MainBonus>(); waitBackground = GameObject.FindObjectOfType<WaitBackground>(); }