// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent<GameController>(); } if (gameController == null) { Debug.Log("Cannot find 'GameController' Script"); } rb = GetComponent<Rigidbody>(); Acc = GetComponent<AudioSource>(); target = Random.Range(boundary.xMin, boundary.xMax); //target = Random.Range(-4.0f, 4.0f); Instantiate(AItarget, new Vector3( Mathf.Clamp(AItarget.GetComponent<Transform>().position.x, boundary.xMin, boundary.xMax), 0.0f, rb.position.z ), AItransform.rotation); Debug.Log("Target"+ AItarget.GetComponent<Transform>().position.x); }
public void UpdateInfo(GameController.StateInformation information) { if (_shouldUpdate) { if (_savedHaresPercent == -1) { _savedHaresPercent = information.Hares; _indicator.sprite = _savedHaresPercent > GameController.GetInstance().MaxHaresPercent ? _redSprite : _normalSprite; _targetRotation = PercentToDegree(_savedHaresPercent); _isAnimationFinished = false; } else { int newHaresPercent = information.Hares; if (newHaresPercent != _savedHaresPercent) { _savedHaresPercent = newHaresPercent; if(_indicator.gameObject.activeInHierarchy) StartCoroutine(Blink()); _targetRotation = PercentToDegree(_savedHaresPercent); _isAnimationFinished = false; } } } }
// Use this for initialization void Start () { GameControlObject = GameObject.Find("GameController"); gameController = (GameController)GameControlObject.GetComponent(typeof(GameController)); ObjectBall = GameObject.Find("ObjectBall"); ballController = (BallControll)ObjectBall.GetComponent(typeof(BallControll)); //BodySourceManager = GameObject.Find("BodyManager"); //RayColor = Color.white; // Create struct right arm //arm rightArm = new arm(); rightArm.frameCount = 0; rightArm.deactivated = false; //rightArm.Object = GameObject.Find("RightArm"); rightArm.runningPositionLocation = false; rightArm.handOnCooldown = false; rightArm.pointer= new Vector3(0,0,0); rightArm.Opointer = new Vector3(0, 0, 0); rightArm.listen2gestures = false; rightArm.rayColor = Color.red; // Create struct left arm //arm leftArm = new arm(); leftArm.frameCount = 0; leftArm.deactivated = false; //leftArm.Object = GameObject.Find("LeftArm"); leftArm.runningPositionLocation = false; leftArm.handOnCooldown = false; leftArm.listen2gestures = false; leftArm.pointer = new Vector3(0, 0, 0); leftArm.Opointer = new Vector3(0, 0, 0); leftArm.rayColor = Color.red; // Get camera Position Player = GameObject.Find("PlayerRef"); PlayerOriginalPosition = Player.transform.position; OriginalPositionRightHand = new Vector3(0, 0, 0); OriginalPositionLeftHand = new Vector3(0, 0, 0); //Camera.main.transform.position = PlayerOriginalPosition; //Camera.main.transform.position.x = Player.transform.position.x; if (gameController.leftie) { leftie = true; leftArm.mainArm = true; rightArm.mainArm = false; } else { leftie=false; rightArm.mainArm = true; leftArm.mainArm = false; } }
// Use this for initialization void Start() { _gameControllerRef = this.GetComponent<GameController>(); eyeClient = GameObject.FindGameObjectWithTag("EyeTribeHandler").GetComponent<EyeTribeClient>(); playerRef = _gameControllerRef.players[0].GetComponent<PlayerController>(); }
// Use this for initialization void Start() { if( Instance == null ) Instance = this; else Destroy(this); }
public bool SaveActiveScore(string worldName, GameController gc) { WorldRecordData wd = GetWorldRecordByName(worldName); bool newRecord = false; float sc = ScoreController.GetScore(gc.moveSpeedY, gc.timeSpent, gc.finalScore, gc.score); if (wd == null) { wd = new WorldRecordData(); wd.name = worldName; data.worldRecords.Add(wd); } if (gc.moveSpeedY > wd.topSpeed) { wd.topSpeed = gc.moveSpeedY; newRecord = true; } if (gc.timeSpent > wd.topTime) { wd.topTime = gc.timeSpent; newRecord = true; } if (sc > wd.topScore) { wd.topScore = sc; newRecord = true; } return (newRecord); }
void Start() { S = this; level = 0; levelMax = castles.Length; StartLevel(); }
void Start() { // Game controller object set up GameObject gameControllerObject = GameObject.FindWithTag ("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent<GameController>(); } if (gameControllerObject == null) Debug.Log ("Cannot find 'GameController' script"); // Player controller object setup GameObject playerControllerObject = GameObject.FindWithTag("Player"); if (playerControllerObject != null) { playerController = playerControllerObject.GetComponent<PlayerController>(); } if (playerControllerObject == null) Debug.Log("Cannot find 'PlayerController' script"); //GameObject playerControllerObject = GameObject.Find("Player"); //playerController = (PlayerController)playerControllerObject.GetComponent(typeof(PlayerController)); }
public override void Turn(GameController controller, System.Drawing.Point location) { base.Turn(controller, location); var playerLocation = controller.PlayerLocation; Active = playerLocation.X == location.X || playerLocation.Y == location.Y; }
void Awake() { gc = GameObject.FindWithTag("GameController").GetComponent<GameController>(); cc = GetComponent<CharacterController>(); move = new Vector3(); }
void Start() { GameObject gameControllerObject = GameObject.FindWithTag ("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent<GameController>(); } }
// Use this for initialization void Start() { gameState = GameState.InGame; //SAFE CODE : Check si il existe un autre gamemanager si c'est le cas, je m'autodetruit if (gameController != null && gameController != this) { Destroy(this.gameObject); return; } // pour qu'on puisse y accéder dans les methodes statiques gameController = this; // L'objet n'est pas détruit quand on change de scène //DontDestroyOnLoad(this.gameObject); SettingTarget(); BrowseLists(); //chargement de menu //Application.LoadLevel("Menu"); //Application.LoadLevel("arena"); foreach (GameObject go in Killers) { LoadObjectives(go); } }
// Use this for initialization void Start() { game = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>(); mainCam = GameObject.FindWithTag("MainCamera").camera; rezzSpot = GameObject.FindWithTag("Player"); }
protected void OnButtonStateChanged(GameController.ControllerNumber cNum, GameController.Buttons button, bool pressed) { if (!_paused) { // Take into account special cases: // 1. Thumbsticks are mouse clicks in cursor mode if (_cursorMode && button == GameController.Buttons.LeftStick) { UnsafeWin32Calls.SendMouseClick(_cursorPositionX, _cursorPositionY, System.Windows.Input.MouseButton.Left, pressed); return; } if (_cursorMode && button == GameController.Buttons.RightStick) { UnsafeWin32Calls.SendMouseClick(_cursorPositionX, _cursorPositionY, System.Windows.Input.MouseButton.Right, pressed); return; } KeyBinding kb = _settings.KeyBindings.GetKeyBinding(_triggersPressed, button); // 2. Swap look/cursor mode if (pressed && kb.KeyBoardKey == System.Windows.Input.Key.Attn) { _cursorMode = !_cursorMode; return; } // Handle normal key clicks UnsafeWin32Calls.PostKeyClick(kb.KeyBoardKey, kb.Modifier, pressed); } }
public void SceneSwitchers(int target) { //consider using this for level load stat controller = GameObject.Find("GameController"); //finds gamecontroller control = controller.GetComponent<GameController>(); control.SceneSwitchers(target); }
void Start() { furnace = furnaceObject.GetComponent<Furnace> (); game = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameController> (); sounds = GameObject.FindGameObjectWithTag ("SoundBank").GetComponent<SoundBank> (); fireSounds.clip = sounds.firebreathing; }
void Start () { gamecontroller = FindObjectOfType (typeof(GameController)) as GameController; anim = GetComponentInChildren<Animator> (); rgd2Player = GetComponent<Rigidbody2D> (); check = GameObject.Find ("Check").gameObject.transform; }
public MainForm() { SuspendLayout(); _humanBoard = new Board(); _computerBoard = new Board(false); _humanPlayer = new HumanPlayer("You", _computerBoard); _computerPlayer = new ComputerPlayer("Computer"); _scoreboard = new ScoreBoard(_humanPlayer, _computerPlayer, 10, 100); _controller = new GameController(_humanPlayer, _computerPlayer, _humanBoard, _computerBoard, _scoreboard); _shuffleButton = CreateButton(ShuffleCharacter.ToString(), ButtonBackColor); _newGameButton = CreateButton(NewGameCharacter.ToString(), ButtonBackColor); _startGameButton = CreateButton(StartGameCharacter.ToString(), ButtonBackColor); SetupWindow(); LayoutControls(); _scoreboard.GameEnded += OnGameEnded; _shuffleButton.Click += OnShuffleButtonClick; _startGameButton.Click += OnStartGameButtonClick; _newGameButton.Click += OnNewGameButtonClick; ResumeLayout(); StartNewGame(); }
void Awake() { // Get the rigidBody component of this gameObject RB = GetComponent<Rigidbody2D>(); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>(); }
// Use this for initialization void Start() { gamecontroller = GameObject.Find ("GameController").GetComponent<GameController>(); LeanTouch.OnFingerSwipe = (LeanFinger finger)=>{ moveCommond.x = finger.SwipeDelta.x; moveCommond.y = finger.SwipeDelta.y; if(Mathf.Abs(moveCommond.x) >= Mathf.Abs(moveCommond.y)) { moveCommond.y = 0; if(moveCommond.x > 0) { moveCommond.x = 1; }else { moveCommond.x = -1; } }else { moveCommond.x = 0; if(moveCommond.y > 0) { moveCommond.y = 1; }else { moveCommond.y = -1; } } gamecontroller.moveCommond(moveCommond); }; }
public Console(GameController game) { this.game = game; this.InitializeComponent(); init(); }
// Use this for initialization void Start() { anim = GetComponent<Animator> (); gc = (GameController) FindObjectOfType(typeof(GameController)); door = GameObject.FindWithTag ("Door"); anim.enabled = false; }
// Use this for initialization void Start() { thePlayer = GameObject.FindGameObjectWithTag ("Player"); gameController = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameController> (); randomDelay = Random.Range (0, 2); nextSpawn = Time.time + randomDelay; }
void Start() { gameController = GameObject.Find("GameController").GetComponent<GameController>(); if (gameController.startingLives - gameController.currentLives != 0) transform.position = gameController.oldCameraPosition; }
void Start() { controller = GameObject.Find("Controllers").GetComponent<GameController>(); cageRenderer = GetComponentInChildren<Renderer>(); cageUI = GetComponentInChildren<Canvas>(); startColor = cageRenderer.material.color; }
protected void Awake () { gameController = this; // Bind events MessageReceivedSignal.AddListener (OnServerMessage); }
void Start() { gc = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>(); navMeshAgent = this.gameObject.GetComponent<NavMeshAgent>(); groundBoundsBox = GameObject.FindGameObjectWithTag("GroundBounds"); SwapSpriteUp(); }
public void Load(string path) { if(File.Exists(Application.persistentDataPath + path)) { BinaryFormatter binaryFormatter = new BinaryFormatter(); FileStream file = File.Open(Application.persistentDataPath + path, FileMode.Open); //deserializing the file so we can get the values back SaveData saveData = binaryFormatter.Deserialize(file) as SaveData; //get all components GameObject gameController = GameObject.FindGameObjectWithTag(Tags.GAMECONTROLLER); _gameController = gameController.GetComponent<GameController>(); //setting all values _gameController.level = saveData.level; _gameController.lives = saveData.lives; _gameController.checkpointPosition = saveData.checkpointPosition; _gameController.score = saveData.score; _gameController.goldCoins = saveData.goldCoins; //closing the file after every value is set file.Close(); if (OnGameLoaded != null) OnGameLoaded(); } else { if (OnNewGame != null) OnNewGame(); //new game } SavePaths.currentPath = path; }
protected void Awake() { if (Game == null) { Game = GameController.Instance; configs = Config.GetConfigs(); } }
void Awake() { game = FindObjectOfType<GameController>(); gravityBoxes = transform.Find("GravityBoxes").GetComponentsInChildren<LogicGravityBox>(); floatyBoxes = transform.Find("FloatyBoxes").GetComponentsInChildren<Rigidbody>(); floatyCables = transform.Find("FloatyCables").GetComponentsInChildren<LogicCable>(); }
protected void Init() { _gameController = GameController.Instance; _collectibleSprite = transform.GetComponent <SpriteRenderer>(); Debug.Log("Initilized"); }
public static bool getCondition(Unit performer, Vector3Int target, GameController controller) { return(true); }
private void Awake() { instance = this; }
bool checkDirection() { BoxCollider collider = GetComponent <BoxCollider>(); if (castRay(t.position + new Vector3(-collider.size.x * t.localScale.x / rayConst, -collider.size.y * t.localScale.y / rayConst, 0), GameController.getDirectionVector3(GameController.Direction.Down), linkDetectionLength, LayerMask.GetMask("Player")) || castRay(t.position + new Vector3(collider.size.x * t.localScale.x / rayConst, -collider.size.y * t.localScale.y / rayConst, 0), GameController.getDirectionVector3(GameController.Direction.Down), linkDetectionLength, LayerMask.GetMask("Player")) || castRay(t.position, GameController.getDirectionVector3(GameController.Direction.Down), linkDetectionLength, LayerMask.GetMask("Player")) || castRay(t.position + new Vector3(collider.bounds.extents.x - collider.bounds.size.x, collider.bounds.extents.y - collider.bounds.size.y - 0.01f, 0), GameController.getDirectionVector3(GameController.Direction.Right), collider.bounds.size.x, LayerMask.GetMask("Player"))) { return(true); } return(false); }
public abstract void CheckLevelPerks(int playerLevel, GameController controller);
void Start() { _time = limit_time; gameController = GameObject.Find("GameController"); gmctrl = gameController.GetComponent <GameController>(); }
private void OnMouseDown() { GameController.GetInstance().Level1(); }
void Start() { gc = GameController.instance; }
public League(List <TeamController> teams) { gameController = GameObject.FindObjectOfType <GameController>(); teamList = teams; }
public PlatformAi(PirateModel.PirateType pirateType, MapModel map, ModelLink modelLink, SpaceModel location, GameController gameController) : base(pirateType, map, modelLink, gameController) { this.location = location; base.SpawnPirate(location); }
public abstract void RespondToInput(GameController controller);
private void Update() { if (ChangeSlot) { ChangePosition(); if (Input.GetKeyDown(KeyCode.Mouse0)) { Debug.Log(currentSlot.getPosition()); currentSlot = null; ChangeSlot = false; } } else if (Input.GetKeyDown(KeyCode.Mouse0)) { Inventory inv = GameController.FindInventory(); if (inv != null) { Vector2Int coord = FindSlot(inv); // Posição no Array2D Slot slot = inv.Get(coord.x, coord.y); if (slot != null) { if (Input.GetKey(KeyCode.LeftControl) && (inv as ISizeFixed) != null) { ChangeSlot = true; currentSlot = slot; //ChangePosition(slot); } Item item = slot.getItem(); Vector2Int position = slot.getPosition(); Slot current = GameController.currentHand; // Não tem item no Slot && Tem item na mão if (item == null && current != null) { if (inv.Set(current.getItem(), coord, current.getAmount())) { GameController.currentHand = null; } } else // Tem item no Slot && Não tem item na mão if (slot.itemExists && current == null) { GameController.currentHand = (Slot)slot.Clone(); slot.removeItem(); } else // Tem item no slot && Tem item na mão if (slot.itemExists && current != null) { if (item.isItem(current.getItem().getID())) { slot.addAmount(current.getAmount()); GameController.currentHand = null; } else { if (inv.Set(current.getItem(), coord, current.getAmount())) { GameController.currentHand = slot; } } } } } } }
void Start() { gc = GameObject.Find("GameController").GetComponent <GameController>(); rend = GetComponent <Renderer> (); origC = rend.material.color; }
public override void activate() { int rand = Random.Range(0, 14); switch (rand) { case 0: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nLùi <b>3 bước</b>.", "OK", () => { GameController.movePlayerInTurn(3, true); steps = 0; needActivation = true; }); break; case 1: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nBạn được bầu làm chủ tịch hội đồng quản trị, đưa cho mỗi người chơi <color=#aa0115><b>50Đ</b></color>.", "OK", () => { List <Player> otherPlayers = GameController.getPlayersNotInTurn(); Player playerInTurn = GameController.playerInTurn(); int sum = 50 * otherPlayers.Count; if (playerInTurn.getFund() < sum) { if (playerInTurn.calNetWorth() < sum) { playerInTurn.declareBankrupt(otherPlayers); } else { otherPlayers.ForEach((player) => { playerInTurn.debit(50, player); }); Modal.instance().showModal("Bạn không đủ <color=#aa0115><b>" + sum + "Đ</b></color>. Cần bán tài sản để trả!", "OK", () => { }); } } else { otherPlayers.ForEach((player) => { playerInTurn.pay(player, 50); }); } }); break; case 2: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nĐến nhà máy gần nhất. Nếu qua <color=#22c4ff><b>Khởi hành</b></color> nhận <color=#216C2A><b>200Đ</b></color>.", "OK", () => { steps = 0; while (Board.instance().getPlayerInTurnBlock().GetComponent <Factory>() == null) { GameController.movePlayerInTurn(1); steps++; } needActivation = true; }); break; case 3: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\n<b>Vào tù</b>!", "OK", () => { Board.instance().getBlock(30).activate(); }); break; case 4: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nĐến <color=#00d8ff><b>Ga Hà Nội</b></color>. Nếu đi qua <color=#22c4ff><b>Khởi hành</b></color> nhận <color=#216C2A><b>200Đ</b></color>.", "OK", () => { steps = 0; while (GameController.playerInTurn().position != 5) { GameController.movePlayerInTurn(1); steps++; } needActivation = true; }); break; case 5: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nĐến <color=#ff83d2><b>Quảng trường Ba Đình</b></color>. Nếu đi qua <color=#22c4ff><b>Khởi hành</b></color> nhận <color=#216C2A><b>200Đ</b></color>.", "OK", () => { steps = 0; while (GameController.playerInTurn().position != 11) { GameController.movePlayerInTurn(1); steps++; } needActivation = true; }); break; case 6: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nVề <color=#22c4ff><b>Khởi hành</b></color> nhận <color=#216C2A><b>200Đ</b></color>.", "OK", () => { GameController.jumpPlayerInTurn(0); steps = 0; needActivation = true; }); break; case 7: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nĐến <color=#328bcb><b>Phú Quốc</b></color>.", "OK", () => { steps = 0; while (GameController.playerInTurn().position != 39) { GameController.movePlayerInTurn(1); steps++; } needActivation = true; }); break; case 8: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nĐến hạn thu tiền thuê nhà, nhận <color=#216C2A><b>200Đ</b></color>.", "OK", () => { GameController.playerInTurn().addFund(200); }); break; case 9: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nĐên <color=#cc2c2f><b>Hội An</b></color>. Nếu đi qua <color=#22c4ff><b>Khởi hành</b></color> nhận <color=#216C2A><b>200Đ</b></color>.", "OK", () => { steps = 0; while (GameController.playerInTurn().position != 24) { GameController.movePlayerInTurn(1); steps++; } needActivation = true; }); break; case 10: int fee = 0; Board.instance().getBlockOwnedByPlayer(GameController.playerInTurn()).ForEach((block) => { if (block.GetComponent <Buildable>() != null) { int properties = block.GetComponent <Buildable>().getProperties(); if (properties < 5) { fee += 25 * properties; } else { fee += 200; } } }); Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nBảo trì nhà: với mỗi nhà trả <b>25Đ</b>, mỗi khách sạn trả <b>100Đ</b>. Tổng: <color=#aa0115><b>" + fee + "Đ</b></color>", "OK", () => { if (GameController.playerInTurn().getFund() < fee) { if (GameController.playerInTurn().calNetWorth() < fee) { GameController.playerInTurn().declareBankrupt(); } else { GameController.playerInTurn().debit(fee); Modal.instance().showModal("Bạn không đủ <color=#aa0115><b>" + fee + "Đ</b></color>. Cần bán tài sản để trả!", "OK", () => { }); } } else { GameController.playerInTurn().pay(fee); } }); break; case 11: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nĐến nhà ga gần nhất. Nếu qua <color=#22c4ff><b>Khởi hành</b></color> nhận <color=#216C2A><b>200Đ</b></color>.", "OK", () => { steps = 0; while (Board.instance().getPlayerInTurnBlock().GetComponent <Station>() == null) { GameController.movePlayerInTurn(1); steps++; } needActivation = true; }); break; case 12: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nNộp thuế <i>Đỗ Nghèo Khỉ</i> <color=#aa0115><b>15Đ</b></color>.", "OK", () => { if (GameController.playerInTurn().getFund() < 15) { if (GameController.playerInTurn().calNetWorth() < 15) { GameController.playerInTurn().declareBankrupt(); } else { GameController.playerInTurn().debit(15); Modal.instance().showModal("Bạn không đủ <color=#aa0115><b>" + 15 + "Đ</b></color>. Cần bán tài sản để trả!", "OK", () => { }); } } else { GameController.playerInTurn().pay(15); } }); break; case 13: Modal.instance().showModal("<size=150%><color=#523d7b><b>Cơ Hội:</b></color></size>\nNhận tiền lãi ngân hàng <color=#216C2A><b>50Đ</b></color>.", "OK", () => { GameController.playerInTurn().addFund(50); }); break; } }
void Start() { renderer = GetComponent <MeshRenderer>(); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); }
// Use this for initialization void Start() { textScore = GetComponent <Text>(); gc = FindObjectOfType <GameController>(); }
void Awake() { Gamecontroller = this; }
private void Awake() { gc = GameObject.Find("Controller").GetComponent <GameController>(); }
public Wait(GameController gameController) { _gameController = gameController; }
public override void RespondToInput(GameController gc, string[] separatedInputWords) { gc.roomNavigation.AttemptToChangeRooms(separatedInputWords[1]); }
public override void RespondToInput(GameController controller, string[] separatedInputWords) { controller.ClearCollectionsForNewRoom(); controller.UnpackRoom(); controller.interactableItems.QuitHacking(); }
void Awake() { audioSource = GetComponent <AudioSource>(); gameController = GameObject.Find("GameController").GetComponent <GameController>(); }
void Start() { gc = GameObject.FindWithTag("GameController").GetComponent <GameController> (); }
void Start() { controller = GameObject.Find("GameController").GetComponent <GameController>(); GameObject clickButton = transform.Find("Button").gameObject; //ww clickButton.GetComponent<UIButton>().onClick.Add(new EventDelegate(RestartGame)); }
public GameController() { m_instance = this; }
public void setGameController(GameController gc) { gameController = gc; }
bool finished;// we done with this one yet? // Start is called before the first frame update void Start() { gc = FindObjectOfType <GameController>(); Init(); }
// Start is called before the first frame update void Start() { game = FindObjectOfType <GameController>(); scoreText = GetComponent <TextMeshProUGUI>(); scoreText.text = "Current Score = " + score; }
// Use this for initialization void Start() { gc = GameObject.Find("[CameraRig]").GetComponent <GameController>(); fc = GameObject.Find("ForwardHolder").GetComponent <ForwardController>(); }
void Awake() { controller = GetComponent <GameController>(); }