void Start() { networkManager = GetComponent<NetworkManagerScript>(); mainMenu = GetComponent<MainMenuScript>(); pause = GetComponent<PauseMenuScript>(); scoreMenu = GetComponent<ScoreMenuScript>(); chatRoom = GetComponent<ChatRoomScript>(); chatBoxColor = new Color(1,1,1,GameSettings.chatBoxOpacity); chatRect = new Rect(0, 100, 300, 400); }
// Use this for initialization void Awake() { score = new List<PlayerScoreInfo>(); GameObject game = GameObject.FindGameObjectWithTag("GameController"); hud = game.GetComponent<HUDScript>(); scoreMenu = game.GetComponent<ScoreMenuScript>(); gameManager = game.GetComponent<GameManagerScript>(); spawnManager = game.GetComponent<SpawnManagerScript>(); hud.RegisterScoreKeeper(this); scoreMenu.RegisterScoreKeeper(this); gameManager.RegisterScoreKeeper(this); spawnManager.RegisterScoreKeeper(this); ResetScore(); }
void Awake() { jumpCount = totalJumps = GameSettings.standardJumpCount; abilities = new List<Ability>(); GameObject game = GameObject.FindGameObjectWithTag("GameController"); hud = game.GetComponent<HUDScript>(); scoreMenu = game.GetComponent<ScoreMenuScript>(); networkManager = game.GetComponent<NetworkManagerScript>(); playerData = game.GetComponent<PlayerDataScript>(); nameDisplay = transform.Find("CharacterNameDisplay").GetComponent<CharacterNameDisplayScript>(); }