示例#1
0
        public void addPool(ICharAssetVO charAssetVO)
        {
            IPool <GameObject> enemyPool = new Pool <GameObject> ();

            enemyPool.instanceProvider = new ResourceInstanceProvider(charAssetVO.assetData, resourceManager);
            enemyPool.inflationType    = PoolInflationType.INCREMENT;

            _poolList.Add(charAssetVO.assetData.id, enemyPool);
        }
示例#2
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;
        }
示例#3
0
        private void parseData(IGameConfig gameConfig)
        {
            IEnemyVO enemyVO = gameConfig.enemyConfig.getEnemyVOById(id);

            assetVO = gameConfig.assetConfig.getEnemyAssetById(enemyVO.asset_id);

            speed    = enemyVO.speed;
            hp       = enemyVO.hp;
            damage   = enemyVO.damage;
            cooldown = enemyVO.cooldown;
            exp_give = enemyVO.exp_give;

            gold_drop_min = enemyVO.gold_drop_min;
            gold_drop_max = enemyVO.gold_drop_max;
        }