Пример #1
0
        public string getNameById(int id)
        {
            ICharInfoVO charInfoVO = getCharInfoVOById(id);
            string      result     = (charInfoVO != null) ? charInfoVO.name : "";

            return(result);
        }
Пример #2
0
        public float getSpeedById(int id)
        {
            ICharInfoVO charInfoVO = getCharInfoVOById(id);
            float       result     = (charInfoVO != null) ? charInfoVO.speed : 1f;

            return(result);
        }
Пример #3
0
        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;
        }
Пример #4
0
        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);
        }