Пример #1
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }
Пример #2
0
    private void Start()
    {
        Spawner  = FindObjectOfType <Spawner>();
        scoring  = FindObjectOfType <Scoring>();
        PPInGame = PostProcessingInGame.Instance;

        if (Color == COLOR.RED)
        {
            controllerReference = VRTK_DeviceFinder.GetControllerReferenceLeftHand();
        }
        else
        {
            controllerReference = VRTK_DeviceFinder.GetControllerReferenceRightHand();
        }
    }