Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1.         protected override void CreateScene()
  2.         {
  3.             // Create a 2D camera
  4.             FixedCamera2D camera2d = new FixedCamera2D("camera");
  5.             camera2d.BackgroundColor = Color.CornflowerBlue;
  6.             EntityManager.Add(camera2d);
  7.  
  8.             Entity sprite = new Entity()
  9.                 .AddComponent(new Transform2D() { Position = new Vector2(250,250) })
  10.                 .AddComponent(new Sprite(StaticResources.DefaultTexture))
  11.                 .AddComponent(new SpriteRenderer(DefaultLayers.Alpha))
  12.                 .AddComponent(new PlayerBehavior());
  13.  
  14.            EntityManager.Add(sprite);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement