/// <summary> /// コンストラクタ /// マスターデータを登録します /// </summary> /// <param name="datas">csvによるstring配列データ</param> public ClientBuilder(string[] datas) { id = int.Parse(datas[0]); name = datas[1]; modelId = datas[2]; spc = int.Parse(datas[3]); dex = int.Parse(datas[4]); level = int.Parse(datas[5]); questType = (QuestType)Enum.Parse(typeof(QuestType), datas[6]); int i = 7; for (; datas[i] != "end"; i++) { massage.Add(datas[i]); } i++; for (; datas[i] != "end"; i++) { underTookMassage.Add(datas[i]); } i++; for (; datas[i] != "end"; i++) { clearedMassage.Add(datas[i]); } }
public static IQuest getTypeQuest(QuestType type, FlagList flags, Client client) { switch (type) { case EXTERMINATION: return(new ExterminationQuest(flags, client)); } throw new System.ArgumentException("unkown QuestType"); }
public static IMissionBuilder getRandomMission(int baseLevel) { var types = Enum.GetValues(typeof(QuestType)); int typeRand = UnityEngine.Random.Range(0, types.Length); QuestType type = (QuestType)types.GetValue(typeRand); switch (type) { case EXTERMINATION: return(new ExterminationMissonBuilder(baseLevel)); } throw new NotSupportedException("unkown QuestType"); }
public Client(int id, Dictionary <FriendlyAbility, int> abilities, int level, Vector3 pos, Quaternion rotate) { this.id = id; this.level = level; this.abilities = new Dictionary <FriendlyAbility, int>(abilities); var builder = ClientMasterManager.getInstance().getClientBuilderFromId(id); this.NAME = builder.getName(); this.MASSAGES = builder.getMassges(); this.UNDERTOOK_MASSAGES = builder.getUnderTookMassges(); this.CLEAR_MASSAGES = builder.getClearedMassges(); this.QUEST_TYPE = builder.getQuestType(); this.UNIQUE_ID = UniqueIdCreator.creatUniqueId(); var modelPrefab = (GameObject)Resources.Load("Models/" + builder.getModelId()); container = MonoBehaviour.Instantiate(modelPrefab, pos, rotate).GetComponent <Container>(); container.setCharacter(this); needTown = true; }
public Client(ClientBuilder builder, Town livingTown) { this.id = builder.getId(); this.NAME = builder.getName(); this.MASSAGES = builder.getMassges(); this.UNDERTOOK_MASSAGES = builder.getUnderTookMassges(); this.CLEAR_MASSAGES = builder.getClearedMassges(); this.level = builder.getLevel(); this.QUEST_TYPE = builder.getQuestType(); this.abilities.Add(DEX, builder.getDex()); this.abilities.Add(SPC, builder.getSpc()); this.UNIQUE_ID = UniqueIdCreator.creatUniqueId(); var modelPrefab = (GameObject)Resources.Load("Models/" + builder.getModelId()); container = MonoBehaviour.Instantiate(modelPrefab).GetComponent <Container>(); container.setCharacter(this); this.livingTown = livingTown; needTown = true; isActivated = true; }