public void ChangeStateTo(State nextState) { if (currentState != null) { currentState.OnExit(this); } currentState = states[nextState]; currentState.OnEnter(this); }
//-- void SetTileSetMode(object o, EventArgs e) { state = tilesetmode; }
void SetObstructionEditMode(object o, EventArgs e) { state = obstructionmode; }
void SetMapEntEditMode(object o, EventArgs e) { state = entityeditmode; }
void SetCopyPasteMode(object o, EventArgs e) { state = copypastemode; }
public void Init() { // Assigns events and such //form.KeyDown += new KeyEventHandler(this.KeyPress); //form.MouseDown += new MouseEventHandler(this.MouseClick); //form.MouseWheel += new MouseEventHandler(this.MouseClick); //form.MouseMove += new MouseEventHandler(this.MouseDown); //form.MouseUp += new MouseEventHandler(this.MouseUp); //form.Closing += new CancelEventHandler(this.OnClosing); //form.Controls.Add(statbar); //form.Menu = menu; // make the window bigger; if we don't, GL will just scale things. Blech. //form.ClientSize = new System.Drawing.Size( // form.XRes, form.YRes// + statbar.Height //); form.Show(); state = tilesetmode; //form.Text = "Mannux -- Editor"; }
public void SetState(IEditorState state) { currentState = state; }
public void SetState(IEditorState state) { // dummy }