示例#1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="objectBuilder"></param>
        public static void registerElement(IObjectBuilder objectBuilder, AnimationService animationService)
        {
            ParameterSequenceBuilder sequenceBuilder = new ParameterSequenceBuilder();
            sequenceBuilder.createSequence();
            sequenceBuilder.addParameter(new FloatParameter("position","0.0,0.0,0.0"));
            sequenceBuilder.addParameter(new IdParameter("animation",""));

            objectBuilder.registerElement(new Constructor(animationService), sequenceBuilder.CurrentSequence, typeof(AnimationPosition3D), "AnimationPosition3D", null);
        }
示例#2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="objectBuilder"></param>
        public static void registerElement(IObjectBuilder objectBuilder, AnimationService animationService)
        {
            ParameterSequenceBuilder sequenceBuilder = new ParameterSequenceBuilder();
            sequenceBuilder.createSequence();
            sequenceBuilder.addParameter(new IdParameter("animationId",XnaScrapId.INVALID_ID.ToString()));
            sequenceBuilder.addParameter(new FloatParameter("time","0.0"));
            sequenceBuilder.addParameter(new SequenceParameter("values", new FloatParameter("timeAndValue","0.0,0.0"))); //

            objectBuilder.registerElement(new Constructor(animationService), sequenceBuilder.CurrentSequence, typeof(AnimationValueCreator), "AnimationValueCreator", null);
        }
示例#3
0
        public AnimationPosition3D(IDataReader state, AnimationService animationService)
            : base(state)
        {
            addInterface(typeof(IPosition3D));

            m_position.X = state.ReadSingle();
            m_position.Y = state.ReadSingle();
            m_position.Z = state.ReadSingle();

            m_animationId = new XnaScrapId(state);
            IAbstractAnimation player = animationService.getAnimation(XnaScrapId.INVALID_ID);

            animationService.animateMe(m_animationId,player, new TimeSpan(0), false, animationChanged);
        }
示例#4
0
        public AnimationValueCreator(IDataReader state, AnimationService animationService)
            : base(state)
        {
            //XnaScrapId animationId = new XnaScrapId(state);
            //float time = state.ReadSingle();

            //animationService.addAnimation(animationId, new AnimationValue.AnimationValueFactory());

            //List<CurvePoint> curvePoints = new List<CurvePoint>();
            //int numPoints = state.ReadInt32();
            //for (int i = 0; i < numPoints; ++i)
            //{
            //    CurvePoint cp = new CurvePoint();
            //    cp.time = TimeSpan.FromSeconds(state.ReadSingle());
            //    cp.value = state.ReadSingle();
            //    curvePoints.Add(cp);
            //}
            //animation.Curve.addPoints(curvePoints);
        }
示例#5
0
        public TestGame(int processId = 0, string window = "")
        {
            //graphics = new GraphicsDeviceManager(this);
            //graphics.PreferredDepthStencilFormat = DepthFormat.Depth24;
            //graphics.ApplyChanges();
            Content.RootDirectory = "Content";

            // Frame rate is 30 fps by default for Windows Phone.
            TargetElapsedTime = TimeSpan.FromTicks(333333);

            m_core = new Core(this);
            m_scriptExecutor = XmlScriptExecutor.GetInstance(this);
            m_scriptCompiler = new XmlScriptCompilerService(this);
            m_collisionManager = new CollisionManager(this);
            m_sceneManager = new SceneManager(this);
            m_inputManager = new InputManager(this);
            m_animationService = new AnimationService(this);
            // graphics should be inserted last, as they should be updated at the end of a frame
            //RenderManager.TargetWindow target = new RenderManager.TargetWindow();
            //target.ProcessId = processId;
            //target.ChildWndCaption = window;
            //m_renderManager = new RenderManager(this, graphics, target);
            m_renderManager = new RenderManager(this, graphics);
            #if WINDOWS
            m_netCtrl = new NetCtrlService(this);
            #endif
        }
示例#6
0
 public Constructor(AnimationService animationService)
 {
 }