Esempio n. 1
0
        /// <summary>
        /// Initialize this weapon.
        /// </summary>
        public virtual void Initialization()
        {
            Flipped         = false;
            _spriteRenderer = this.gameObject.GetComponent <SpriteRenderer> ();
            _comboWeapon    = this.gameObject.GetComponent <ComboWeapon>();


            SetParticleEffects(false);
            WeaponState = new InfStateMachine <WeaponStates>(gameObject, true);
            WeaponState.ChangeState(WeaponStates.WeaponIdle);
            WeaponAmmo          = GetComponent <WeaponAmmo> ();
            _animatorParameters = new List <List <string> >();
            _aimableWeapon      = GetComponent <WeaponAim>();
            InitializeAnimatorParameters();
            if (WeaponAmmo == null)
            {
                CurrentAmmoLoaded = MagazineSize;
            }
        }