Exemple #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            spriteFont = Content.Load<SpriteFont>("Font");

            squareTex = Content.Load<Texture2D>("square");
            botTex = Content.Load<Texture2D>("magabot_cm");
            gridTex = Content.Load<Texture2D>("grid");
            obstacleTex = DrawingHelper.CreateCircleTexture(GraphicsDevice, 10, Color.Purple, Color.Black);

            bot = new TextureSprite(botTex);
            botFrame = new Transform2();
            renderer.SubscribeTexture(botFrame, bot);

            obstacles = new TextureSprite[proximity.Count];
            obstacleFrames = new Transform2[proximity.Count];
            for (int i = 0; i < obstacles.Length; i++)
            {
                obstacles[i] = new TextureSprite(obstacleTex);
                obstacleFrames[i] = new Transform2();
                renderer.SubscribeTexture(obstacleFrames[i], obstacles[i]);
            }
            // TODO: use this.Content to load your game content here
        }
 public Transform2(Transform2 transform)
     : this(transform.Position, transform.Rotation, transform.Scale)
 {
 }
 public Transform2(Transform2 transform)
     : this(transform.Position, transform.Rotation, transform.Scale)
 {
 }