Exemple #1
0
        void OnFire(GunType.GunMode typeMode)
        {
            //animation
            SetForceAnimation(typeMode.FireAnimationName, true);

            //parent unit animation
            if (!string.IsNullOrEmpty(typeMode.FireUnitAnimationName))
            {
                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    parentUnit.SetForceAnimation(typeMode.FireUnitAnimationName, true);
                }
            }
        }
Exemple #2
0
        void OnFire(MeleeWeaponType.MeleeWeaponMode typeMode)
        {
            //sound
            SoundPlay3D(typeMode.SoundFire, .5f, true);

            //animation
            SetForceAnimation(typeMode.FireAnimationName, true);

            //parent unit animation
            if (!string.IsNullOrEmpty(typeMode.FireUnitAnimationName))
            {
                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    parentUnit.SetForceAnimation(typeMode.FireUnitAnimationName, true);
                }
            }
        }
Exemple #3
0
        void OnReload()
        {
            //sound
            SoundPlay3D(Type.SoundReload, .5f, true);

            //animation
            SetForceAnimation(Type.ReloadAnimationName, true);

            //parent unit animation
            if (!string.IsNullOrEmpty(Type.ReloadUnitAnimationName))
            {
                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    parentUnit.SetForceAnimation(Type.ReloadUnitAnimationName, true);
                }
            }
        }