Beispiel #1
0
        public void ToolChangeRegisterNewEvent(Tools toolEnums, AnimationToolType animationToolEnum)
        {
            m_Model.ClearReceivedCalls();
            m_Events.toolChanged.Invoke(m_Tools[toolEnums]);
            var nextTool = Tools.EditPose;

            if (toolEnums == nextTool)
            {
                nextTool = Tools.GenerateGeometry;
            }


            m_Events.toolChanged.Invoke(m_Tools[nextTool]);

            // Check storage received calls
            var calls = m_Storage.ReceivedCalls();

            Assert.AreEqual(2, calls.Count());
            var firstCallArg = (AnimationToolUsageEvent)calls.ElementAt(0).GetArguments()[0];

            Assert.IsTrue(firstCallArg.animation_tool == AnimationToolType.PreviewPose && firstCallArg.animation_events.Count == 0);
            firstCallArg = (AnimationToolUsageEvent)calls.ElementAt(1).GetArguments()[0];
            Assert.IsTrue(firstCallArg.animation_tool == animationToolEnum && firstCallArg.animation_events.Count == 0);
            m_Storage.DidNotReceive().SendApplyEvent(Arg.Any <AnimationToolApplyEvent>());
        }
Beispiel #2
0
 void StartNewEvent(AnimationToolType animationType, int tick)
 {
     SendLastEvent(tick);
     m_CurrentEvent = new AnimationToolUsageEvent()
     {
         instance_id      = m_InstanceId,
         character_mode   = m_Model.mode == SkinningMode.Character,
         animation_tool   = animationType,
         time_start_s     = tick,
         animation_events = new List <AnimationEvent>()
     };
 }