Ejemplo n.º 1
0
 void Start()
 {
     orgClimbSpeed  = climbSpeed;
     moveController = (moveController == null) ? GetComponent <MovementController>() : moveController;
     swimController = (swimController == null) ? GetComponent <SwimController>() : swimController;
     weaponManager  = (weaponManager == null) ? GetComponentInChildren <WeaponManagerNew>() : weaponManager;
     playerManager  = dontDestroy.currentGameManager.GetComponent <PlayerManager>();
 }
Ejemplo n.º 2
0
 void Start()
 {
     lastPosition      = gameObject.transform.position;
     defaultFog        = RenderSettings.fog;
     defaultFogColor   = RenderSettings.fogColor;
     defaultFogDensity = RenderSettings.fogDensity;
     defaultSkybox     = RenderSettings.skybox;
     if (soundSource == null)
     {
         soundSource = GetComponent <AudioSource>();
     }
     targetCam       = GameObject.FindGameObjectWithTag(swimTowardCamLook).GetComponent <Camera>();
     climbController = (climbController == null) ? GetComponent <ClimbController>() : climbController;
     moveController  = (moveController == null) ? GetComponent <MovementController>() : moveController;
     weaponManager   = (weaponManager == null) ? GetComponentInChildren <WeaponManagerNew>() : weaponManager;
 }