// --------- Init stuff --------- void Start() { DontDestroyOnLoad(this); MasterServer.dedicatedServer = true; MasterServer.ipAddress = "84.113.142.137"; Application.targetFrameRate = 60; guiScript = GetComponent<FPSGUI>(); messageScript = GetComponent<FPSMessages>(); artilleryScript = GetComponent<FPSArtillery>(); gameSettings = GetComponent<GameModeScript>(); Application.LoadLevel("MenuScene"); }
// Use this for initialization void Start() { theNetwork = GameObject.Find("_SophieNet").GetComponent<SophieNetworkScript>(); theGUI = GameObject.Find("_SophieNet").GetComponent<FPSGUI>(); artillery = GameObject.Find("_SophieNet").GetComponent<FPSArtillery>(); if (thisPlayer.local && theNetwork.gameSettings.pitchBlack){ Camera.main.backgroundColor = Color.black; RenderSettings.ambientLight = Color.black; } cc = GetComponent<CharacterController>(); if (thisPlayer.lives>=0){ if (isLocal){ SetModelVisibility(false); }else{ SetModelVisibility(true); } Respawn(); }else{ //we joined as a spectator SetModelVisibility(false); transform.position = -Vector3.up * 99f; } }