Beispiel #1
0
    private void createPlayerRainWithIntensity(float intensity, RAKPlayer player)
    {
        RainScript rain = Instantiate(terrainMaster.getPlayerRainPrefab(), player.transform).GetComponent <RainScript>();

        rain.FollowCamera  = player.GetComponent <Camera>();
        rain.RainIntensity = intensity;
    }
Beispiel #2
0
 // Use this for initialization
 public void Initialize()
 {
     player = GetComponentInParent <RAKPlayer>();
     if (RAKPlayer.vrPlayer)
     {
         trackedObject        = GetComponent <SteamVR_TrackedObject>();
         transform.localScale = Vector3.one;
         steamVRController    = SteamVR_Controller.Input((int)trackedObject.index);
     }
     else
     {
         steamVRController = null;
     }
     vibrationQueue = new List <VibrationRequest>();
     initialized    = true;
 }