internal static bool isObjectNeedPosition(EObjectID selectedIndex) { switch (selectedIndex) { case EObjectID.GROUND: case EObjectID.ROPE: case EObjectID.STAIR: case EObjectID.WALL: case EObjectID.STAIRFLAGCHANGE: case EObjectID.BLOCK: case EObjectID.SWINGBAR: case EObjectID.FIREGROUND: case EObjectID.SLIDECOLUMN: case EObjectID.LEVELCOMPLETE: return(false); case EObjectID.APPLE: case EObjectID.CAMEL: case EObjectID.ENEMY1: case EObjectID.ENEMY2: case EObjectID.ENEMY3: case EObjectID.ENEMY4: case EObjectID.ENEMY5: case EObjectID.JUMPBAR: default: return(true); } }
public GameObject(int x, int y, int width, int height, EObjectID id) { this.X = x; this.Y = y; this.Width = width; this.Height = height; this.Id = id; }
internal static Bitmap GetObjectImg(EObjectID id) { switch (id) { case EObjectID.APPLE: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Apple)); case EObjectID.COLLAPSEGROUND: return(new Bitmap(NMGame_MapEditor.Properties.Resources.CollapseGround)); case EObjectID.JUMPBAR: return(new Bitmap(NMGame_MapEditor.Properties.Resources.JumpBar)); case EObjectID.ENEMY1: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Enemy1)); case EObjectID.ENEMY2: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Enemy2)); case EObjectID.ENEMY3: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Enemy3)); case EObjectID.ENEMY4: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Enemy4)); case EObjectID.ENEMY5: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Enemy5)); case EObjectID.THROWPOT: return(new Bitmap(NMGame_MapEditor.Properties.Resources.ThrowPotEnemy)); case EObjectID.CHECKPOINT: return(new Bitmap(NMGame_MapEditor.Properties.Resources.CheckPoint)); case EObjectID.LAMP: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Lamp)); case EObjectID.GEM: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Gem)); case EObjectID.HEATH: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Health)); case EObjectID.MONKEY: return(new Bitmap(NMGame_MapEditor.Properties.Resources.AbuToken)); case EObjectID.GENIE: return(new Bitmap(NMGame_MapEditor.Properties.Resources.GenieToken)); case EObjectID.PEDDLER: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Peddler)); default: return(new Bitmap(NMGame_MapEditor.Properties.Resources.Camel)); } }
internal static bool isObjectNeedMoveRect(EObjectID selectedIndex) { switch (selectedIndex) { case EObjectID.ENEMY1: case EObjectID.ENEMY2: return(true); default: return(false); } }
public GameObject(int left, int top, int right, int bottom, MyRECT moveRect, EObjectID objID, int posX = 0, int posY = 0) { mLeft = left; mTop = top; mRight = right; mBottom = bottom; mObjID = objID; mPositionX = posX; mPositionY = posY; MStairLayer = 0; this.mMoveRect = moveRect; }
public MapEditor() { InitializeComponent(); mListObject = new List <GameObject>(); foreach (EObjectID foo in EObjectID.GetValues(typeof(EObjectID))) { cbObjType.Items.Add(foo.ToString()); } cursorState = CursorState.DoNothing; cursorState = CursorState.DoNothing; //cbObjType.SelectedIndex = 0; btnDrawRectangle.Visible = false; btnPlaceObject.Visible = false; btnDrawMoveRect.Visible = false; }
public GameObject(int left, int top, int right, int bottom, EObjectID objID, int posX = 0, int posY = 0, int stairLayer = 0, int stairLayerCh1 = 0) { mLeft = left; mTop = top; mRight = right; mBottom = bottom; mObjID = objID; mPositionX = posX; mPositionY = posY; mStairLayer = stairLayer; mStairLayerChangeFr = stairLayer; MStairLayerChangeTo = stairLayerCh1; this.mMoveRect = new MyRECT(0, 0, 0, 0); }
internal static bool isObjectNeedDrawBoundingRect(EObjectID selectedIndex) { switch (selectedIndex) { case EObjectID.GROUND: case EObjectID.ROPE: case EObjectID.CAMEL: case EObjectID.APPLE: case EObjectID.COLLAPSEGROUND: case EObjectID.JUMPBAR: case EObjectID.CHECKPOINT: case EObjectID.GEM: case EObjectID.HEATH: case EObjectID.MONKEY: case EObjectID.GENIE: return(false); case EObjectID.ENEMY1: case EObjectID.STAIRFLAGCHANGE: default: return(true); } }