public string getNameById(int id) { ICharInfoVO charInfoVO = getCharInfoVOById(id); string result = (charInfoVO != null) ? charInfoVO.name : ""; return(result); }
public float getSpeedById(int id) { ICharInfoVO charInfoVO = getCharInfoVOById(id); float result = (charInfoVO != null) ? charInfoVO.speed : 1f; return(result); }
public PlayerModel(int setId, IGameConfig gameConfig) : base(setId, gameConfig) { assetVO = gameConfig.assetConfig.getPlayerAssetById(setId); name = assetVO.assetData.id; ICharInfoVO charInfoVO = gameConfig.charInfoConfig.getCharInfoVOById(setId); moveSpeed = charInfoVO.speed; moveForce = charInfoVO.moveForce; _coins = userCharVO.coins; }
public ICharInfoVO getCharInfoVOById(int id) { ICharInfoVO result = null; for (byte i = 0; i < _list.Count; i++) { if (_list [i].id == id) { result = _list [i]; break; } } return(result); }