Ejemplo n.º 1
0
 public void Setup()
 {
     this.shooter = HookPlayer.Instance.Get <CharacterShooter>();
     if (CURRENT != null)
     {
         WeaponCrosshair.Destroy();
     }
     CURRENT = this;
 }
Ejemplo n.º 2
0
        protected override void OnStartAimWeapon()
        {
            base.OnStartAimWeapon();

            if (this.currentAmmo.aimingMode != Ammo.AimType.Crosshair)
            {
                return;
            }
            WeaponCrosshair.Create(this.currentAmmo.crosshair);
        }
Ejemplo n.º 3
0
        public static void Create(GameObject prefab = null)
        {
            if (prefab == null)
            {
                prefab = Resources.Load <GameObject>(DEFAULT_PATH);
            }
            GameObject instance = Instantiate(prefab);

            WeaponCrosshair crosshair = instance.GetComponent <WeaponCrosshair>();

            crosshair.Setup();
        }
Ejemplo n.º 4
0
 protected override void OnStopAimWeapon()
 {
     base.OnStopAimWeapon();
     WeaponCrosshair.Destroy();
 }