Exemple #1
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 );
                }
            }
        }
Exemple #2
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;
        }