public void init() { ConfigConstant.init(); ViewConstant.init(); //Biggo添加 //if (FightMain.isLocal) { AIConstant.init(); //} if (this.isShowLobby) { this.lobby.init(); this.gotoLobby(); } else { this.startFight(); } }
private static Proto.Pattern GenerateProtoPattern(Pattern pattern) { Proto.Pattern protoPattern = new Proto.Pattern(); protoPattern.Width = ConfigConstant.GetInt("FRAME_WIDTH"); protoPattern.Height = ConfigConstant.GetInt("FRAME_HEIGHT"); protoPattern.FramesPerBeat = pattern.FramesPerBeat; protoPattern.UniqueCycles = pattern.UniqueCycles; foreach (Frame frame in pattern.Frames) { Proto.Frame protoFrame = new Proto.Frame(); foreach (Pixel pixel in frame.Pixels) { protoFrame.Pixels.Add(ColorToInt32(pixel.Color)); } protoPattern.Frames.Add(protoFrame); } return(protoPattern); }