Ejemplo n.º 1
0
        /// <summary>
        /// initialise the world
        /// </summary>
        public override void Init()
        {
            Areas = new List <GameArea>();

            GameArea mainArea = new GameArea(this, 30, 20);

            mainArea.Init();
            Areas.Add(mainArea);

            visibleArea = mainArea;

            mainArea.addObject(new Player()
            {
                Position = new Vector2(15, 10), drawRadius = 0.25f, collisionRadius = 0.25f
            });
            mainArea.addObject(new Diamond()
            {
                Position = new Vector2(10, 10), drawRadius = 0.25f, collisionRadius = 0.25f
            });
            mainArea.addObject(new Diamond()
            {
                Position = new Vector2(10, 15), drawRadius = 0.25f, collisionRadius = 0.25f
            });
        }
Ejemplo n.º 2
0
 /// <summary>
 /// assign this object to a given area
 /// </summary>
 public GameArea setArea(GameArea area)
 {
     return(Area = area);
 }