You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Otter;
namespace OtterApp
{
class GameScene: Scene
{
Graphic currentGraphic;
public string SCENENAME { get; set; }
public GameScene(string SceneName, List<Entity> entityList = null) : base()
{
SCENENAME = SceneName;
// Add a random color to the Scene (just to indicate which scene is currently active.)
AddGraphic(Image.CreateRectangle(Game.Instance.Width, Game.Instance.Height, Color.Random));
if (entityList != null)
{
foreach (Entity entity in entityList)
{
entity.RemoveSelf();
this.Add(entity);
}
}
currentGraphic = Image.CreateRectangle(Game.Instance.Width, Game.Instance.Height, Color.Random);
}
public Graphic getGraphics()
{
return currentGraphic;
}
public override void Update()
{
base.Update();
}
}
}