public Character(string characterName, CharacterConfig config, int slot, bool isLocal) : base(config) { this.characterName = characterName; this.slot = slot; this.isLocal = isLocal; cmdMgr = new CmdManager(config.commandContent, this); }
public static Character CreateCharacter(string name, int slot, bool isLocal) { CharacterConfig config = ConfigReader.Parse <CharacterConfig>(FileReader.Read("Chars/" + name + "/" + name + ".def")); ActionsConfig actionsConfig = ConfigReader.Parse <ActionsConfig>(FileReader.Read(config.action)); string commands = FileReader.Read(config.command); config.SetActions(actionsConfig.actions.ToArray()); config.SetCommand(commands); Character p = new Character(name, config, slot, isLocal); return(p); }