示例#1
0
        public AssetConfig()
        {
            _playerAssetList = new Dictionary <int, ICharAssetVO>();
            _playerAssetList.Add(1, new CharAssetVO(1, PLAYER_SIRKO, 0.3f, 2f, true));
            _playerAssetList.Add(2, new CharAssetVO(2, PLAYER_NELYA, 0.4f, 2f, true));

            enemyAssetList = new Dictionary <int, ICharAssetVO> ();
            enemyAssetList.Add(1, new CharAssetVO(1, ENEMY_DICKENS, 1.5f, 1.7f, false));
            enemyAssetList.Add(2, new CharAssetVO(2, ENEMY_MAVKA, 0.7f, 1.7f, true));
            enemyAssetList.Add(3, new CharAssetVO(3, ENEMY_VODYANOJ, 1f, 1.3f, false));
            enemyAssetList.Add(4, new CharAssetVO(4, ENEMY_DIDKO, 0.7f, 2.3f, true));

            _bgAssetList = new Dictionary <int, IBgAssetVO> ();
            IBgAssetVO bgAssetVO = new BgAssetVO(1, BACKGROUND_VILLAGE);

            bgAssetVO.startPosY = -1.24f;
            bgAssetVO.width     = 97f;
            bgAssetVO.margin    = Vector2.zero;
            bgAssetVO.smooth    = new Vector2(4, 0);
            bgAssetVO.minXAndY  = new Vector2(-7.7f, 0f);            //-25
            bgAssetVO.maxXAndY  = new Vector2(9.5f, 0f);             //25
            _bgAssetList.Add(1, bgAssetVO);

            bgAssetVO           = new BgAssetVO(1001, BACKGROUND_CHURCH);
            bgAssetVO.startPosY = -1.24f;
            bgAssetVO.width     = 28.4f;
            bgAssetVO.margin    = Vector2.zero;
            bgAssetVO.smooth    = new Vector2(4, 0);
            bgAssetVO.minXAndY  = new Vector2(-2.25f, 0f);            //-25
            bgAssetVO.maxXAndY  = new Vector2(2.25f, 0f);             //25

            _bgAssetList.Add(1001, bgAssetVO);
        }
示例#2
0
        public IBgAssetVO clone()
        {
            IBgAssetVO result = new BgAssetVO(id, assetData.clone());

            result.startPosY = startPosY;
            result.width     = width;

            result.margin = new Vector2(margin.x, margin.y);
            result.smooth = new Vector2(smooth.x, smooth.y);

            result.minXAndY = new Vector2(minXAndY.x, minXAndY.y);
            result.maxXAndY = new Vector2(maxXAndY.x, maxXAndY.y);
            return(result);
        }