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 ); } } }
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; }