void Awake() { Instance = this; if (Network.isClient) hudon = GameObject.Find("Client Scripts").GetComponent<HudOn>(); }
void Start() { if (Network.isServer) { server = GameObject.Find("Network").GetComponent<Server>(); } else { Network.isMessageQueueRunning = true; GameObject obj =GameObject.Find("Client Scripts"); client = obj.GetComponent<OnlineClient>(); hudon = obj.GetComponent<HudOn>(); print("Client Bridge initial" + Network.player); networkView.RPC("clientBridgeLoaded", RPCMode.Server, Network.player); } setUniverseBuffer = new Dictionary<NetworkPlayer, int>(); updateUniverseNamesBuffer = new Dictionary<NetworkPlayer, Dictionary<NetworkViewID, string>>(); updateCharacterNamesBuffer = new Dictionary<NetworkPlayer, Dictionary<NetworkViewID, string>>(); hasClientLoaded = new Dictionary<NetworkPlayer, bool>(); }
void Start() { // Set statics score = 0; gameOver = false; Instance = this; generateBossName(); gameOverBeenDetected = false; main = (Texture2D) Resources.Load ("hud/topleft"); speed = (Texture2D) Resources.Load ("hud/topright"); leaderboard = (Texture2D) Resources.Load ("hud/leaderboard"); universe = (Texture2D) Resources.Load ("hud/bottomleft"); deco = (Font) Resources.Load ("Belgrad"); bossbar = (Texture2D) Resources.Load ("hud/bossbar"); health.normal.background = fillTex(1,1,new Color(0.8f,0f,0f,1f)); energy.normal.background = fillTex(1,1,new Color(0f,0f,0.8f,1f)); bank.normal.background = fillTex (1,1,new Color(0f,0.8f,0f,1f)); gameOverBeenDetected = false; helpPic = (Texture2D) Resources.Load ("menu/howtocut"); queuedToastMessages = new Queue<string>(); StartCoroutine("Toast"); showHelp = true; }