//public static readonly bool IsFirstFrame = true; public static void SetStage(Stage s) { Stage = s; HasStage = true; Camera = new Camera(); }
public override void Init(Stage stage) { MakeGraphic(20, 20, Color.White); Color = Color.Green; Position = new Vector2(400, 200); MaxVelocity.X = 200; MaxVelocity.Y = 200; Drag.X = 20; Drag.Y = 20; //LoadGraphic("SpaceManRun", true, 50, 50); CentreOrigin(); MakeDefaultHitbox(); Type = "player"; SwordSwipe = new Entity(); SwordSwipe.MakeGraphic(30, 30, Color.Blue); SwordSwipe.LoadGraphic("sordanim", true, 30, 50); SwordSwipe.Type = "sword"; SwordSwipe.AddAnimation("swing", new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, 40, false); SwordSwipe.CentreOrigin(); SwordSwipe.MakeDefaultHitbox(); //AddAnimation("run", new int[]{0, 1, 2, 3, 4, 5, 6, 7}, 7, true); //Play("run", true); base.Init(stage); }
public override void Init(Stage stage) { base.Init(stage); MakeGraphic(40, 40, Color.White); Color = Color.Blue; Position = Vector2.Zero; CentreOrigin(); MakeDefaultHitbox(); AoEBox = new Entity(); AoEBox.SetHitbox(80, 80); AoEBox.Hitbox.CentreOrigin(); Stage.Add(AoEBox, false, true); Type = "enemy"; }
public override void Init(Stage stage) { MakeGraphic(20, 20, Color.White); Color = Color.Red; Position = new Vector2(OE.Random.Next(800), OE.Random.Next(480)); while (Math.Abs((float)((Position - player.Position).Length())) < 200) Position = new Vector2(OE.Random.Next(800), OE.Random.Next(480)); MaxVelocity.X = 200; MaxVelocity.Y = 200; //Drag.X = 40; //Drag.Y = 40; CentreOrigin(); MakeDefaultHitbox(); Type = "enemy"; base.Init(stage); }
public override void Init(Stage stage) { Type = "explosion"; base.Init(stage); }
public virtual void Init(Stage stage) { Stage = stage; }