/
domahes
/
Arcade
Обзор
Документация
Войти
/
domahes
/
Arcade
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
js/data/DSetInteractionBlock.js
78 строк
2 KB
domahes
Initial commit with game files
01 июн 2026, 09:31
01 июн 2026, 09:31
0f50ffb
Код
Авторство
О чём код?
/** * Created by Yitian Chen on 2019/1/8. * Settings·data structure of Interactive Block */ function DSetInteractionBlock(rd){ //Is Item Block or not this.isItem = false; //Inner block can be set this.isImplant = false; //Gravity this.isGravity = true; //Through this.isPenetrate = false; //can change image this.isStatus = false; //DeathBlock this.isDie = false; //Can Be Destroied this.isDestroy = false; //Jump this.isJump = false; //Disappear this.isVanish = false; //Gold increase this.money = 0; //Hp increase this.hpValue = 0; //Mp increase this.mpValue = 0; //Max Hp increase this.maxHpValue = 0; //Max Mp increase this.maxMpValue = 0; //life increase this.leftValue = 0; //Read data this.id = rd.readShort(); this.name = rd.readString(); this.BlockId = rd.readShort(); this.BlockId2 = rd.readShort(); this.EventId = rd.readShort(); this.animId = rd.readShort(); this.actorAnimId = rd.readShort(); this.isItem = rd.readBool(); this.isGravity = rd.readBool(); this.isPenetrate = rd.readBool(); this.isStatus = rd.readBool(); if (this.isItem) { this.money = rd.readInt(); this.hpValue = rd.readInt(); this.mpValue = rd.readInt(); this.maxHpValue = rd.readInt(); this.maxMpValue = rd.readInt(); this.leftValue = rd.readInt(); }else { this.isDie = rd.readBool(); this.isDestroy = rd.readBool(); this.isJump = rd.readBool(); this.isVanish = rd.readBool(); this.isImplant = rd.readBool(); } this.cState = []; var length = rd.readInt(); for (var i = 0; i < length; i++) { this.cState[rd.readShort()] = rd.readShort(); } }