public Enemy() : base(new Cog.Vector2(32f, 32f)) { timeSinceJump = Engine.RandomFloat() * -.1f; sc = SpriteComponent.RegisterOn(this, Program.Pixel); sc.Origin = Vector2.One / 2f; sc.Color = Program.Foreground; }
public Snapshot() { Size = new Cog.Vector2(256f, 96f); Sprite = SpriteComponent.RegisterOn(this, Program.Pixel); Sprite.Origin = new Vector2(0f, 0f); Sprite.Color = Program.Foreground; Sprite.Color.A = 0; Sprite.Scale = Size; RegisterEvent <UpdateEvent>(0, Update); }
public LevelEnd() : base(32) { Texture = Program.Pixel; RegisterEvent <PhysicsUpdateEvent>(0, PhysicsUpdate); var back = SpriteComponent.RegisterOn(this, Program.Portal); back.Color = Program.Foreground; back.Scale = new Vector2(1.1f, 1.1f); SpriteComponent.RegisterOn(this, Program.Portal); }
public Player() : base(new Cog.Vector2(24f, 64f)) { texture = Program.Player; sprite = SpriteComponent.RegisterOn(this, texture); sprite.Origin = new Vector2(textureSize.X / 2f, textureSize.Y / 2f); sprite.Color = Program.Foreground; RegisterEvent <KeyDownEvent>((int)Keyboard.Key.R, 0, Restart); Depth = -1; }