public Wall(Vector2f position) : base(position) { if (Sprite == null) { Sprite = new Sprite(new Texture(SeasonController.getInstance().getSeasonTexture())); } type = GameObjectType.Wall; }
public Wall() { if (Sprite == null) { Sprite = new Sprite(new Texture(SeasonController.getInstance().getSeasonTexture())); } type = GameObjectType.Wall; }
public static SeasonController getInstance() { if (instance == null) { instance = new SeasonController(); } return(instance); }
protected void Init() { sc = SeasonController.getInstance(); TimeNow = ClockObj.ElapsedTime.AsMilliseconds(); TimeSeason = ClockObj.ElapsedTime.AsMilliseconds(); TimeRenderFrame = ClockObj.ElapsedTime.AsMilliseconds(); FrameLast = (int)TimeNow; WorldRender(); }
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]); } } } }