public HumanoidDamageModule(float health, RagdollUtility ragdoll, HitReaction hitReaction, HumanoidAnimationModule animationModule, Transform headTransfrom, Transform chestTransfrom, OnDestoryDeligate onDestroyCallback, Outline outline) : base(health, onDestroyCallback, outline)
 {
     m_ragdoll         = ragdoll;
     m_hitReaction     = hitReaction;
     m_headTransform   = headTransfrom;
     m_chestTransform  = chestTransfrom;
     m_animationSystem = animationModule;
 }
예제 #2
0
 public HumanoidEquipmentModule(Weapon[] weapons,
                                WeaponProp[] props,
                                MovingAgent.CharacterMainStates state,
                                GameObject target,
                                Recoil recoil,
                                HumanoidAnimationModule animSystem,
                                AgentParameters parameters)
 {
     m_currentState    = state;
     m_target          = target;
     m_recoil          = recoil;
     m_animationSystem = animSystem;
     getAllWeapons(weapons, props);
     m_agentParameters = parameters;
 }
예제 #3
0
        public virtual void Awake()
        {
            m_agentParameters = this.GetComponent <AgentParameters>();
            m_target          = new GameObject();
            m_movmentVector   = new Vector3(0, 0, 0);

            // Create Animation system.
            AimIK aimIK = this.GetComponent <AimIK>();

            aimIK.solver.target = m_target.transform;
            m_animationModule   = new HumanoidAnimationModule(this.GetComponent <Animator>(), this.GetComponent <AimIK>(), 10);

            // Create equipment system.
            Weapon[]     currentWeapons     = this.GetComponentsInChildren <Weapon>();
            WeaponProp[] currentWeaponProps = this.GetComponentsInChildren <WeaponProp>();
            m_equipmentModule = new HumanoidEquipmentModule(currentWeapons, currentWeaponProps, m_characterState, m_target, GetComponent <Recoil>(), m_animationModule, m_agentParameters);

            // Create movment system.
            m_movmentModule = new HumanoidMovmentModule(this.transform, m_characterState, m_target, m_animationModule);

            // Create Damage module
            m_damageModule = new HumanoidDamageModule(5, this.GetComponent <RagdollUtility>(), this.GetComponentInChildren <HitReaction>(), m_animationModule, findHeadTransfrom(), findChestTransfrom(), destroyCharacter, this.GetComponentInChildren <Outline>());
        }
 public HumanoidMovmentModule(Transform transfrom, MovingAgent.CharacterMainStates characterState, GameObject target, HumanoidAnimationModule animationSystem) : base(target, transfrom)
 {
     m_characterState  = characterState;
     m_animationSystem = animationSystem;
 }