예제 #1
0
        void Start()
        {
            dfUnity        = DaggerfallUnity.Instance;
            streamingWorld = GameObject.FindObjectOfType <StreamingWorld>();
            titleScreen    = GameObject.FindObjectOfType <ShowTitleScreen>();
            //songPlayer = GameObject.FindObjectOfType<DaggerfallSongPlayer>();
            playerEnterExit = GetComponent <PlayerEnterExit>();

            //if (songPlayer)
            //    songPlayer.Song = SongFilesAll.song_03;
        }
예제 #2
0
 void Start()
 {
     playerGPS       = GetComponent <PlayerGPS>();
     playerEnterExit = GetComponent <PlayerEnterExit>();
     if (RainParticles)
     {
         RainParticles.SetActive(false);
     }
     if (SnowParticles)
     {
         SnowParticles.SetActive(false);
     }
 }
        void Start()
        {
            dfUnity         = DaggerfallUnity.Instance;
            streamingWorld  = GameObject.FindObjectOfType <StreamingWorld>();
            playerEnterExit = GetComponent <PlayerEnterExit>();
            playerGPS       = GetComponent <PlayerGPS>();
            playerMotor     = GetComponent <PlayerMotor>();
            playerMouseLook = GameObject.FindObjectOfType <PlayerMouseLook>();
            titleScreen     = GameObject.FindObjectOfType <ShowTitleScreen>();

            // Get starting run speed
            if (playerMotor)
            {
                startRunSpeed = playerMotor.runSpeed;
            }
        }
예제 #4
0
        void Start()
        {
            dfUnity    = DaggerfallUnity.Instance;
            songPlayer = GetComponent <DaggerfallSongPlayer>();

            // Try to find local player GPS if not set
            if (LocalPlayerGPS == null)
            {
                GameObject player = GameObject.FindGameObjectWithTag("Player");
                if (player)
                {
                    LocalPlayerGPS = player.GetComponent <PlayerGPS>();
                }
            }

            // Get required player components
            if (LocalPlayerGPS)
            {
                playerEnterExit = LocalPlayerGPS.GetComponent <PlayerEnterExit>();
                playerWeather   = LocalPlayerGPS.GetComponent <PlayerWeather>();
            }
        }
        void Start()
        {
            // Store references
            dfUnity         = DaggerfallUnity.Instance;
            dfAudioSource   = GetComponent <DaggerfallAudioSource>();
            playerMotor     = GetComponent <PlayerMotor>();
            playerEnterExit = GetComponent <PlayerEnterExit>();

            // Add our own custom audio source at runtime as we need to change the pitch of footsteps.
            // We don't want that affecting to other sounds on this game object.
            customAudioSource              = gameObject.AddComponent <AudioSource>();
            customAudioSource.hideFlags    = HideFlags.HideInInspector;
            customAudioSource.playOnAwake  = false;
            customAudioSource.loop         = false;
            customAudioSource.dopplerLevel = 0f;

            // Set start position
            lastPosition = GetHorizontalPosition();

            // Set starting footsteps
            currentFootstepSound = FootstepSoundNormal;
        }
 void Start()
 {
     dfUnity         = DaggerfallUnity.Instance;
     playerEnterExit = GetComponent <PlayerEnterExit>();
 }
예제 #7
0
        void Start()
        {
            dfUnity = DaggerfallUnity.Instance;
            streamingWorld = GameObject.FindObjectOfType<StreamingWorld>();
            playerEnterExit = GetComponent<PlayerEnterExit>();
            playerGPS = GetComponent<PlayerGPS>();
            playerMotor = GetComponent<PlayerMotor>();
            playerMouseLook = GameObject.FindObjectOfType<PlayerMouseLook>();
            titleScreen = GameObject.FindObjectOfType<ShowTitleScreen>();

            // Get starting run speed
            if (playerMotor)
                startRunSpeed = playerMotor.runSpeed;

            // Get starting torch range
            if (PlayerTorch != null)
                startTorchRange = PlayerTorch.range;
        }
        void Start()
        {
            // Store references
            dfUnity = DaggerfallUnity.Instance;
            dfAudioSource = GetComponent<DaggerfallAudioSource>();
            playerMotor = GetComponent<PlayerMotor>();
            playerEnterExit = GetComponent<PlayerEnterExit>();

            // Add our own custom audio source at runtime as we need to change the pitch of footsteps.
            // We don't want that affecting to other sounds on this game object.
            customAudioSource = gameObject.AddComponent<AudioSource>();
            customAudioSource.hideFlags = HideFlags.HideInInspector;
            customAudioSource.playOnAwake = false;
            customAudioSource.loop = false;
            customAudioSource.dopplerLevel = 0f;
            customAudioSource.spatialBlend = 0f;

            // Set start position
            lastPosition = GetHorizontalPosition();

            // Set starting footsteps
            currentFootstepSound = FootstepSoundNormal;
        }
예제 #9
0
        public float RayDistance = 2.0f;        // Distance of ray check, tune this to your scale and preference

        void Start()
        {
            playerGPS       = GetComponent <PlayerGPS>();
            playerEnterExit = GetComponent <PlayerEnterExit>();
            mainCamera      = GameObject.FindGameObjectWithTag("MainCamera");
        }
예제 #10
0
 void Start()
 {
     playerGPS = GetComponent<PlayerGPS>();
     playerEnterExit = GetComponent<PlayerEnterExit>();
     mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
 }
 void Start()
 {
     playerEnterExit = GetComponent <PlayerEnterExit>();
     StartCoroutine(ManageAmbientLight());
 }
 void Start()
 {
     dfUnity = DaggerfallUnity.Instance;
     playerEnterExit = GetComponent<PlayerEnterExit>();
 }
예제 #13
0
 void Start()
 {
     playerGPS = GetComponent<PlayerGPS>();
     playerEnterExit = GetComponent<PlayerEnterExit>();
     if (RainParticles) RainParticles.SetActive(false);
     if (SnowParticles) SnowParticles.SetActive(false);
 }