// Use this for initialization void Start() { lifePrefab = Resources.Load("Prefabs/Life") as GameObject; explosiveTrap = Resources.Load("Prefabs/Weapons/ExplosiveTrap") as GameObject; inmovilTrap = Resources.Load("Prefabs/Weapons/InmovilTrap") as GameObject; blindGrenadePrefab = Resources.Load("Prefabs/Weapons/blindGrenade") as GameObject; grenadePrefab = Resources.Load("Prefabs/Weapons/Grenade") as GameObject; cam = GetComponentInChildren <Camera> (); cam.transform.position = camFirstPerson.position; cam.enabled = true; controller = GetComponent <CharacterController>(); weaponController = GetComponent <WeaponController2>(); InitializeCooldowns(); // networkManager = FindObjectOfType <CustomNetworkManager>(); // if (isServer) { networkManager.RegisterPlayer(gameObject); networkManager.SetColorToPlayers(); } // effectManager = FindObjectOfType <Effects>(); }
// Use this for initialization void Start() { pointer = Resources.Load("Textures/crosshair") as Texture; currentLife = Resources.Load("Textures/green") as Texture; totalLife = Resources.Load("Textures/red") as Texture; backgroundHud = Resources.Load("Textures/backgroundHUD") as Texture; trap = Resources.Load("Textures/trampa") as Texture; trapCoolDown = Resources.Load("Textures/trampaDesact") as Texture; claymore = Resources.Load("Textures/Claymore") as Texture; claymoreCoolDown = Resources.Load("Textures/ClaymoreDesact") as Texture; flashbang = Resources.Load("Textures/Aturdidiora") as Texture; flashbangCoolDown = Resources.Load("Textures/AturdidioraDesact") as Texture; imageBullet = Resources.Load("Textures/bullet") as Texture; imageRecharge = Resources.Load("Textures/recharge") as Texture; black = Resources.Load("Textures/silver-metal-texture-vector") as Texture; bomb = Resources.Load("Textures/granada") as Texture; bombCooldown = Resources.Load("Textures/granadaDesact") as Texture; player = GetComponent <PlayerController> (); life = GetComponent <HealthController> (); weapon = GetComponent <WeaponController2>(); currentScene = SceneManager.GetActiveScene(); }