Ejemplo n.º 1
0
        protected override void AfterInitItem(ref MotionSceneInfo item)
        {
            base.AfterInitItem(ref item);

            int triggerIDIndex = item.indexsForID.Length >= 1 ? item.indexsForID[0] : -1;

            if (item.isCombo)
            {
                int transIDIndex          = item.indexsForID.Length >= 2 ? item.indexsForID[1] : -1;
                ComboMotionCreater target = GetComboMotionCreater(SkillsMapper, triggerIDIndex, transIDIndex, item.checkComboTime);
                item.ComboMotion = target;

                int index = Values.IndexOf(item);
                if (!mComboMotionIndex.Contains(index))
                {
                    mComboMotionIndex.Add(index);
                }
            }
            else
            {
                int       idForSkillMapper = item.indexsForID[0];
                SkillInfo infos            = SkillsMapper[idForSkillMapper];
                item.MotionSkillInfo = infos;
                item.Motion          = new AnimationInfoUpdater();
            }
        }
Ejemplo n.º 2
0
        private ComboMotionCreater GetComboMotionCreater(SkillsMapper mapper, int IDForTriggers = -1, int IDForTrans = -1, float checkComboTime = 0f)
        {
            ValueItem[]        triggers = (IDForTriggers > -1) ? mapper[IDForTriggers].GetInfos() : emptySkillInfoValueItems;
            ValueItem[]        trans    = (IDForTrans > -1) ? mapper[IDForTrans].GetInfos() : emptySkillInfoValueItems;
            ComboMotionCreater result   = new ComboMotionCreater(trans.Length, triggers, trans);

            return(result);
        }
Ejemplo n.º 3
0
        public ComboMotionCreater GetComboMotion(int id, ref Animator animator)
        {
            ComboMotionCreater result    = default;
            MotionSceneInfo    sceneInfo = GetValue(id);

            if (sceneInfo != default)
            {
                if (sceneInfo.isCombo)
                {
                    result = sceneInfo.ComboMotion;
                    result.StartComboMotion(ref animator);
                }
            }
            return(result);
        }