public oPlayer() { Sprite.TextureSource = "elves2"; EditorPath = "Actors"; ImageSpeed = 0.01f; bodyCollider = new ColliderRectangle(this) { Collision = new RectangleF(16, 48, 32, 16), AttachToRoot = true, Name = "bodyCollider" }; Colliders.Add(bodyCollider); }
public oBrick() { EditorPath = "Actors"; ColliderRectangle cr = new ColliderRectangle(this); cr.Name = "MainCollider"; cr.GameObject = this; cr.Collision = new RectangleF(0, 0, 64, 32); Colliders.Add(cr); }
public oGeorgeNew() { EditorPath = "Actors"; Sprite.TextureSource = "george"; bodyCollider = new ColliderRectangle(this); bodyCollider.Collision = new RectangleF(0, 0, 48, 48); bodyCollider.GameObject = this; bodyCollider.Name = "main"; Colliders.Add(bodyCollider); }
public oSolidMask() { EditorPath = "Solid"; Sprite.TextureSource = "texture"; Sprite.Texture = sprite_get("texture"); cr.Collision = new RectangleF(0, 0, 32, 32); cr.Name = "main"; cr.GameObject = this; cr = new ColliderRectangle(this); Colliders.Add(cr); }
public oGem() { EditorPath = "Actors"; ColliderRectangle cr = new ColliderRectangle(this); cr.Name = "MainCollider"; cr.GameObject = this; cr.Collision = new RectangleF(0, 0, 64, 32); // synth_speak_async("Hello World"); Sprite.TextureSource = "Gem"; Colliders.Add(cr); }
public override void EvtCreate() { ColliderRectangle cr = new ColliderRectangle(this); cr.Name = "MainCollider"; cr.GameObject = this; cr.Collision = new RectangleF(0, 0, 128, 16); Colliders.Add(cr); MySurface = surface_create(640, 480); //point_in_rectangle_rotated() }
public Portal(int x, int y, int id, int goto_up, int goto_down, int goto_left, int goto_right, ReadOnlyDictionary <Directions, bool> reverse_direction = null) { this.Depth = 100; this.Position = new Vector2(x, y); this.ID = id; this.DestinationIDs = new ReadOnlyDictionary <Directions, int>(new Dictionary <Directions, int> { [Directions.Up] = goto_up, [Directions.Down] = goto_down, [Directions.Left] = goto_left, [Directions.Right] = goto_right }); this.ReverseDirection = reverse_direction; var regions = new Region[] { new Region(ContentHolder.Get(AvailableTextures.portal_0), 0, 0, Portal.Size, Portal.Size, 0, 0), new Region(ContentHolder.Get(AvailableTextures.portal_1), 0, 0, Portal.Size, Portal.Size, 0, 0), }; this.MainSprite = new AnimatedSprite(regions); this.AddSprite("main", this.MainSprite); this.MainCollider = this.AddColliderRectangle("main", 0, 0, Portal.Size, Portal.Size); }