コード例 #1
0
        public BodyMotionManagerReceiver(IMessageReceiver receiver, BodyMotionManager bodyMotionManager)
        {
            _bodyMotionManager = bodyMotionManager;

            receiver.AssignCommandHandler(
                VmmCommands.EnableWaitMotion,
                message => EnableWaitMotion(message.ToBoolean())
                );
            receiver.AssignCommandHandler(
                VmmCommands.WaitMotionScale,
                message => SetWaitMotionScale(message.ParseAsPercentage())
                );
            receiver.AssignCommandHandler(
                VmmCommands.WaitMotionPeriod,
                message => SetWaitMotionDuration(message.ToInt())
                );
            receiver.AssignCommandHandler(
                VmmCommands.EnableBodyLeanZ,
                message => bodyMotionManager.EnableImageBaseBodyLeanZ(message.ToBoolean())
                );
            receiver.AssignCommandHandler(
                VmmCommands.EnableNoHandTrackMode,
                message => bodyMotionManager.SetNoHandTrackMode(message.ToBoolean())
                );
            _waitingMotionSize = _bodyMotionManager.WaitingBodyMotion.MotionSize;
            SetWaitMotionScale(1.25f);
        }