コード例 #1
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     stateManager    = animator.GetComponent <CharacterStateManager>();
     shieldCharge    = animator.GetComponent <ShieldCharge>();
     taticalMovement = animator.GetComponent <TaticalMovement>();
     stateManager.characterAction = CharacterAction.ShieldCharge;
     stateManager.characterState  = CharacterState.IsInteracting;
     shieldCharge.GetComponent <Collider>().isTrigger = true;
 }
コード例 #2
0
        public override SkillAbstract AttachSkill(CharacterStats _characterStats, AnimationHandler _animationHandler,
                                                  TaticalMovement _taticalMovement, CombatUtils _combatUtils, Skill _skill)
        {
            ShieldCharge shieldCharge = _characterStats.gameObject.AddComponent <ShieldCharge>();

            shieldCharge.characterStats     = _characterStats;
            shieldCharge.animationHandler   = _animationHandler;
            shieldCharge.taticalMovement    = _taticalMovement;
            shieldCharge.characterRigidBody = _taticalMovement.GetComponent <Rigidbody>();
            shieldCharge.stateManager       = _taticalMovement.GetComponent <CharacterStateManager>();
            shieldCharge.skill       = _skill;
            shieldCharge.combatUtils = _combatUtils;
            return(shieldCharge);
        }