Example #1
0
 public Wall(Vector2f position) : base(position)
 {
     if (Sprite == null)
     {
         Sprite = new Sprite(new Texture(SeasonController.getInstance().getSeasonTexture()));
     }
     type = GameObjectType.Wall;
 }
Example #2
0
 public Wall()
 {
     if (Sprite == null)
     {
         Sprite = new Sprite(new Texture(SeasonController.getInstance().getSeasonTexture()));
     }
     type = GameObjectType.Wall;
 }
Example #3
0
 protected void Init()
 {
     sc              = SeasonController.getInstance();
     TimeNow         = ClockObj.ElapsedTime.AsMilliseconds();
     TimeSeason      = ClockObj.ElapsedTime.AsMilliseconds();
     TimeRenderFrame = ClockObj.ElapsedTime.AsMilliseconds();
     FrameLast       = (int)TimeNow;
     WorldRender();
 }
Example #4
0
 protected void Update()
 {
     Physics();
     if (ClockObj.ElapsedTime.AsMilliseconds() - TimeSeason > 10000)
     {
         TimeSeason = ClockObj.ElapsedTime.AsMilliseconds();
         sc.nextSeason();
         for (int i = 0; i < 40; i++)
         {
             for (int j = 0; j < 40; j++)
             {
                 if (objects[i, j].type == GameObjectType.Wall)
                 {
                     objects[i, j].Sprite.Texture = new Texture(SeasonController.getInstance().getSeasonTexture());
                 }
                 //renderWindow.Draw(objects[i, j]);
             }
         }
     }
 }