コード例 #1
0
 public static void InitializeReferences()
 {
     if (MBGlobals._initialized)
     {
         return;
     }
     MBGlobals._actionSets                           = new Dictionary <string, MBActionSet>();
     MBGlobals.HumanWarriorActionSet                 = MBGlobals.GetActionSet("as_human_warrior");
     MBGlobals.HumanVillager1ActionSet               = MBGlobals.GetActionSet("as_human_villager");
     MBGlobals.HumanVillager2ActionSet               = MBGlobals.GetActionSet("as_human_villager_2");
     MBGlobals.HumanVillager3ActionSet               = MBGlobals.GetActionSet("as_human_villager_3");
     MBGlobals.HumanVillager4ActionSet               = MBGlobals.GetActionSet("as_human_villager_4");
     MBGlobals.HumanFemaleVillager1ActionSet         = MBGlobals.GetActionSet("as_human_female_villager");
     MBGlobals.HumanFemaleVillager2ActionSet         = MBGlobals.GetActionSet("as_human_female_villager_2");
     MBGlobals.HumanVillainActionSet                 = MBGlobals.GetActionSet("as_human_villain");
     MBGlobals.HumanPrisonerActionSet                = MBGlobals.GetActionSet("as_human_prisoner");
     MBGlobals.HumanLordActionSet                    = MBGlobals.GetActionSet("as_human_lord");
     MBGlobals.HumanLadyActionSet                    = MBGlobals.GetActionSet("as_human_lady");
     MBGlobals.HumanVillagerDrinkerWithMugActionSet  = MBGlobals.GetActionSet("as_human_villager_drinker_with_mug");
     MBGlobals.HumanVillagerDrinkerWithBowlActionSet = MBGlobals.GetActionSet("as_human_villager_drinker_with_bowl");
     MBGlobals.HumanBarmaidActionSet                 = MBGlobals.GetActionSet("as_human_barmaid");
     MBGlobals.HumanTavernKeeperActionSet            = MBGlobals.GetActionSet("as_human_tavern_keeper");
     MBGlobals.HumanMusicianActionSet                = MBGlobals.GetActionSet("as_human_musician");
     MBGlobals.HumanGameHostActionSet                = MBGlobals.GetActionSet("as_human_game_host");
     MBGlobals.HumanGuardActionSet                   = MBGlobals.GetActionSet("as_human_guard");
     MBGlobals.HumanMaleFaceGenActionSet             = MBGlobals.GetActionSet("as_human_male_facegen");
     MBGlobals.HumanFemaleFaceGenActionSet           = MBGlobals.GetActionSet("as_human_female_facegen");
     MBGlobals.HumanMapActionSet                     = MBGlobals.GetActionSet("as_human_map");
     MBGlobals.HumanMapWithBannerActionSet           = MBGlobals.GetActionSet("as_human_map_with_banner");
     MBGlobals.PlayerMaleActionSet                   = MBGlobals.GetActionSet("as_player_male");
     MBGlobals._initialized                          = true;
 }
コード例 #2
0
        public static void CreateAgentSkeleton(
            this GameEntity gameEntity,
            string skeletonName,
            bool isHumanoid,
            MBActionSet actionSet,
            string monsterUsageSetName,
            Monster monster)
        {
            AgentVisualsNativeData agentVisualsNativeData = new AgentVisualsNativeData()
            {
                MainHandItemBoneIndex          = monster.MainHandItemBoneIndex,
                OffHandItemBoneIndex           = monster.OffHandItemBoneIndex,
                MainHandItemSecondaryBoneIndex = monster.MainHandItemSecondaryBoneIndex,
                OffHandItemSecondaryBoneIndex  = monster.OffHandItemSecondaryBoneIndex,
                RiderSitBoneIndex            = monster.RiderSitBoneIndex,
                ReinHandleBoneIndex          = monster.ReinHandleBoneIndex,
                ReinCollision1BoneIndex      = monster.ReinCollision1BoneIndex,
                ReinCollision2BoneIndex      = monster.ReinCollision2BoneIndex,
                HeadLookDirectionBoneIndex   = monster.HeadLookDirectionBoneIndex,
                ThoraxLookDirectionBoneIndex = monster.ThoraxLookDirectionBoneIndex,
                MainHandNumBonesForIk        = monster.MainHandNumBonesForIk,
                OffHandNumBonesForIk         = monster.OffHandNumBonesForIk,
                ReinHandleLeftLocalPosition  = monster.ReinHandleLeftLocalPosition,
                ReinHandleRightLocalPosition = monster.ReinHandleRightLocalPosition
            };

            gameEntity.Skeleton = MBAPI.IMBSkeletonExtensions.CreateAgentSkeleton(skeletonName, isHumanoid, actionSet.Index, monsterUsageSetName, ref agentVisualsNativeData);
        }
コード例 #3
0
        public static MBActionSet GetActionSet(string actionSetCode)
        {
            MBActionSet mbActionSet = MBActionSet.InvalidActionSet;

            if (!MBGlobals._actionSets.TryGetValue(actionSetCode, out mbActionSet))
            {
                mbActionSet = MBActionSet.GetActionSet(actionSetCode);
                if (!mbActionSet.IsValid)
                {
                    throw new MBNotFoundException("Unable to find action set : " + actionSetCode);
                }
            }
            return(mbActionSet);
        }
コード例 #4
0
 public static AnimationSystemData FillAnimationSystemData(
     this Monster monster,
     MBActionSet actionSet,
     float stepSize,
     bool hasClippingPlane)
 {
     return(new AnimationSystemData()
     {
         ActionSet = actionSet,
         NumPaces = monster.NumPaces,
         MonsterUsageSetIndex = Agent.GetMonsterUsageIndex(monster.MonsterUsage),
         WalkingSpeedLimit = monster.WalkingSpeedLimit,
         CrouchWalkingSpeedLimit = monster.CrouchWalkingSpeedLimit,
         StepSize = stepSize,
         HasClippingPlane = hasClippingPlane
     });
 }
コード例 #5
0
 public MonsterMissionData(Monster monster)
 {
     this._actionSet = MBActionSet.InvalidActionSet;
     this.Monster    = monster;
 }
コード例 #6
0
 public AgentVisualsData ActionSet(MBActionSet actionSet)
 {
     this.ActionSetData = actionSet;
     return(this);
 }