// I wish I was smart enough to not need this function :( protected static String Command2String(MugicCommand c) { switch (c) { case MugicCommand.Rectangle: return "rectangle"; case MugicCommand.Circle : return "circle"; case MugicCommand.Line : return "line"; case MugicCommand.Update : return "update"; default : return "ERROR"; } }
protected void InitPacket(MugicCommand s, MugicPacket p) { if (!wasCreated) { objectId = MugicObjectManager.NextId; p.Command(s, objectId); wasCreated = true; } else { p.Command(MugicCommand.Update, objectId); } }
// I wish I was smart enough to not need this function :( protected static String Command2String(MugicCommand c) { switch (c) { case MugicCommand.Rectangle: return("rectangle"); case MugicCommand.Circle: return("circle"); case MugicCommand.Line: return("line"); case MugicCommand.Update: return("update"); default: return("ERROR"); } }
public void Command(MugicCommand c, int oid) { command = c; objectId = oid; }