Setup doc-slot-core
1.Clone project and open with VSCode: https://gitea.plp19.com/dev-public/doc-slot-core-manual
npm install
npm start
2.Setup follow README
You can read doc at link: http://localhost:3000/docs/intro
Setup project
NOTE:
- When setup list SlotttyItem, these Items in this game is difference with doc: ['WILD', 'PIC1', 'PIC2', 'PIC3', 'PIC4', 'PIC5', 'ACE', 'KING', 'QUEEN', 'JACK', 'TEN', 'NINE', 'COLLECT', 'SCAT']
So these script have to update:
extend-slotty-setting.js
var SlottyItem = p4fslot.require('slotty-item');
var Enum = p4fslot.require('extendable-enum');
Enum.InitEnum(SlottyItem, [
'Pic1',
'Pic2',
'Pic3',
'Pic4',
'Pic5',
'Ace',
'King',
'Queen',
'Jack',
'Ten',
'Nine',
'Collect',
]);
module.exports = SlottyItem;
extend-hyper-gaming-config.js
var HyperGamingConfig = require('hyper-gaming-config');
var SlottyItem = require('slotty-item');
HyperGamingConfig.itemMapper['PIC1'] = SlottyItem.Pic1;
HyperGamingConfig.itemMapper['PIC2'] = SlottyItem.Pic2;
HyperGamingConfig.itemMapper['PIC3'] = SlottyItem.Pic3;
HyperGamingConfig.itemMapper['PIC4'] = SlottyItem.Pic4;
HyperGamingConfig.itemMapper['PIC5'] = SlottyItem.Pic5;
HyperGamingConfig.itemMapper['ACE'] = SlottyItem.Ace;
HyperGamingConfig.itemMapper['KING'] = SlottyItem.King;
HyperGamingConfig.itemMapper['QUEEN'] = SlottyItem.Queen;
HyperGamingConfig.itemMapper['JACK'] = SlottyItem.Jack;
HyperGamingConfig.itemMapper['TEN'] = SlottyItem.Ten;
HyperGamingConfig.itemMapper['NINE'] = SlottyItem.Nine;
HyperGamingConfig.itemMapper['COLLECT'] = SlottyItem.Collect;
extend-slotty-setting.js
BaseSlottySetting.prototype._getPatternNotWin = function () {
return [
[SlottyItem.Pic5, SlottyItem.Pic3, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
SlottyItem.Pic2, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
SlottyItem.Pic2, SlottyItem.Pic6, SlottyItem.Pic2, SlottyItem.Pic1, SlottyItem.Pic2
],
[SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic2, SlottyItem.Pic5, SlottyItem.Pic7,
SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic7,
SlottyItem.Pic7, SlottyItem.Pic3, SlottyItem.Pic4, SlottyItem.Pic2, SlottyItem.Pic3
],
[SlottyItem.Pic1, SlottyItem.Pic2, SlottyItem.Pic3, SlottyItem.Pic7, SlottyItem.Pic3,
SlottyItem.Pic2, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Pic2,
SlottyItem.Pic1, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Pic1
]
];
};
2. Update Asset & Folder Structure:
When add asset to folder structure. Remember to run 4 things:
_Open Preload Scene: P4F Editor -> preload-hyper -> loadAll
_3 step in this image: