Exemple #1
0
        public override void Initialize()
        {
            // create a new SpriteBatch, which can be used to draw textures
            spriteBatch = new SpriteBatch (graphics.GraphicsDevice);

            // pointer
            pointer = new MousePointer (this);
        }
        /// <summary>
        /// Initialize the Game.
        /// </summary>
        public override void Initialize()
        {
            // world
            world = new World (this);
            // input
            knotInput = new KnotInputHandler (this, world);
            // overlay
            overlay = new Overlay (this, world);
            // pointer
            pointer = new MousePointer (this);
            // picker
            picker = new ModelMouseHandler (this, world);

            // pipe renderer
            var knotRenderInfo = new GameObjectInfo ();
            knotRenderInfo.Position = Vector3.Zero;
            renderer = new KnotRenderer (this, knotRenderInfo);
            world.Add (renderer as IGameObject);

            // pipe movements
            movement = new EdgeMovement (this, world, knotRenderInfo);
            world.Add (movement as IGameObject);

            // pipe colors
            coloring = new EdgeColoring (this);

            // load nodes
            Node.Scale = 100;
            Knot = new Knot ();
        }