예제 #1
0
    // Use this for initialization
    void Start()
    {
        if (!Debug)
        {
            return;
        }

        gun.transform.parent = transform;
        gun.transform.position.Set(0, 0, 0);
        gun.transform.rotation = Quaternion.Euler(45, 0, 0);
        gun.gameObject.SetActive(true);

        igun = gun.GetComponent <VR_Controller_Gun>();
    }
예제 #2
0
        protected virtual void Start()
        {
            Audio.AudioController.LoadAudio();
            UIRootFloor.SetActive(false);

            if (PersonTargetPrefabs == null || PersonTargetPrefabs.Count == 0)
            {
                throw new Exception("Scenario will not be able to spawn NPC's. " +
                                    "Please ensure the Spawnable NPC list is filled.");
            }
            SetLoadType();

            foreach (PlayerGunInterface gun in PlayerGunInterface.AllPlayerGuns)
            {
                gun.OnShoot = OnPlayerShoot;
            }

            if (StartOnLoad)
            {
                Play();
            }
            PlayerGun = PlayerGunObject.GetComponent <VR_Controller_Gun>();
        }