Exemplo n.º 1
0
        private void OnReload()
        {
            //sound
            SoundPlay3D(Type.SoundReload, .5f, true);

            //update animation tree
            if (!string.IsNullOrEmpty(Type.ReloadAnimationTrigger))
            {
                foreach (AnimationTree tree in GetAllAnimationTrees())
                {
                    tree.ActivateTrigger(Type.ReloadAnimationTrigger);
                }

                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    foreach (AnimationTree parentTree in parentUnit.GetAllAnimationTrees())
                    {
                        parentTree.ActivateTrigger(Type.ReloadAnimationTrigger);
                    }
                }
            }

            needReloadMessageReceived = false;
            //readyTime = resetTime = Type.ReloadTime;
            //countdown = true;
        }
Exemplo n.º 2
0
        void OnFire(GunType.GunMode typeMode)
        {
            //update animation tree
            if (!string.IsNullOrEmpty(typeMode.FireAnimationTrigger))
            {
                foreach (AnimationTree tree in GetAllAnimationTrees())
                {
                    tree.ActivateTrigger(typeMode.FireAnimationTrigger);
                }

                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    foreach (AnimationTree parentTree in parentUnit.GetAllAnimationTrees())
                    {
                        parentTree.ActivateTrigger(typeMode.FireAnimationTrigger);
                    }
                }
            }
        }
Exemplo n.º 3
0
        void OnReload()
        {
            //sound
            SoundPlay3D(Type.SoundReload, .5f, true);

            //update animation tree
            if (!string.IsNullOrEmpty(Type.ReloadAnimationTrigger))
            {
                foreach (AnimationTree tree in GetAllAnimationTrees())
                {
                    tree.ActivateTrigger(Type.ReloadAnimationTrigger);
                }

                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    foreach (AnimationTree parentTree in parentUnit.GetAllAnimationTrees())
                    {
                        parentTree.ActivateTrigger(Type.ReloadAnimationTrigger);
                    }
                }
            }
        }
Exemplo n.º 4
0
        void OnFire(MeleeWeaponType.MeleeWeaponMode typeMode)
        {
            //sound
            SoundPlay3D(typeMode.SoundFire, .5f, true);

            //update animation tree
            if (!string.IsNullOrEmpty(typeMode.FireAnimationTrigger))
            {
                foreach (AnimationTree tree in GetAllAnimationTrees())
                {
                    tree.ActivateTrigger(typeMode.FireAnimationTrigger);
                }

                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    foreach (AnimationTree parentTree in parentUnit.GetAllAnimationTrees())
                    {
                        parentTree.ActivateTrigger(typeMode.FireAnimationTrigger);
                    }
                }
            }
        }
Exemplo n.º 5
0
        private void OnFire(GunType.GunMode typeMode)
        {
            //update animation tree
            if (!string.IsNullOrEmpty(typeMode.FireAnimationTrigger))
            {
                foreach (AnimationTree tree in GetAllAnimationTrees())
                {
                    tree.ActivateTrigger(typeMode.FireAnimationTrigger);
                }

                Unit parentUnit = GetParentUnit();
                if (parentUnit != null)
                {
                    foreach (AnimationTree parentTree in parentUnit.GetAllAnimationTrees())
                    {
                        parentTree.ActivateTrigger(typeMode.FireAnimationTrigger);
                    }
                }
            }

            readyTime = resetTime = typeMode.BetweenFireTime;
            countdown = true;
        }