/// <summary> /// 创建Dog /// </summary> /// <param name="id"></param> /// <param name="typeId"></param> /// <param name="team"></param> /// <param name="maxHp"></param> /// <param name="attack"></param> /// <param name="defense"></param> /// <param name="attackDistance"></param> /// <param name="name"></param> private static void CreateDog(int typeId, int maxHp, int attack, int defense, double attackDistance, string name) { DogDataModel dogData = new DogDataModel(typeId, maxHp, attack, defense, attackDistance, name); //保存英雄数据 idModelDict.Add(dogData.TypeId, dogData); }
public static DogDataModel GetDogData(int typeId) { DogDataModel dog = null; idDogDict.TryGetValue(typeId, out dog); return(dog); }
public static DogDataModel GetDogData(int dogTypeId) { DogDataModel dataModel = null; idModelDict.TryGetValue(dogTypeId, out dataModel); return(dataModel); }
private static void createDog(int typeId, int hp, int attack, int defense, double attackDistance, string name) { DogDataModel dog = new DogDataModel(typeId, hp, attack, defense, attackDistance, name); idDogDict.Add(dog.TypeId, dog); }