예제 #1
0
        public void Initialize(WeaponHolder weaponHolder, WeaponScriptable weapon)
        {
            WeaponHolder = weaponHolder;
            Crosshair    = weaponHolder.Controller.CrosshairComponent;

            WeaponStats = weapon.WeaponStats;
        }
예제 #2
0
        public void Initialize(WeaponHolder weaponHolder, WeaponScriptable weaponScriptable)
        {
            WeaponHolder       = weaponHolder;
            CrosshairComponent = weaponHolder.Crosshair;

            if (weaponScriptable)
            {
                WeaponStats = weaponScriptable.WeaponStats;
            }
        }
예제 #3
0
        public virtual void Initialize(WeaponStats stats)
        {
            this.stats      = stats;
            currentAccuracy = this.stats.Accuracy;
            CurrentAmmo     = this.stats.AmmoPerMag;

            player  = GameObject.Find("Player").GetComponent <PlayerStats>();
            display = GetComponent <WeaponDisplay>();

            Reload();
        }