/
domahes
/
Arcade
Обзор
Документация
Войти
/
domahes
/
Arcade
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
js/data/DResScene.js
53 строки
1 KB
domahes
Update game scripts and data configurations
01 июн 2026, 10:11
01 июн 2026, 10:11
83cd2f8
Код
Авторство
О чём код?
/** * Created by Yitian Chen on 2019/1/7. * Data structure of scene */ function DResScene(rd){ //Blocks this.blocks = []; //Tilesets this.decorates = []; //Read data this.id = rd.readShort(); this.name = rd.readString(); this.background1 = new SecenBack(rd); this.background2 = new SecenBack(rd); var length = rd.readInt(); for(var i = 0;i<length ;i++){ var sb = new SceneBlock(rd); this.blocks.push(sb); } length = rd.readInt(); for(i = 0;i<length;i++){ this.decorates.push(rd.readShort()); } this.getDec = function(index){ if(index < this.decorates.length){ return RV.NowRes.findResDecorate(this.decorates[index]); } return null; } } /** * Data structure of background */ function SecenBack(rd){ //file this.file = rd.readString(); //draw type this.type = rd.readShort(); } /** * Data structure of blocks */ function SceneBlock(rd){ //image resource ID this.id = rd.readShort(); //block type (GroundBlock、SlideBlock、SwampBlock、DeathBlock) this.type = rd.readShort(); }