zone state init

This commit is contained in:
ntr
2018-12-28 16:17:35 +11:00
parent b36559ae9f
commit aa97f82d82
7 changed files with 178 additions and 9 deletions
@@ -44,8 +44,6 @@ function calculateTweenParams(sourceSpawn, targetSpawn, account) {
}
function animatePhase(scene, game, resolution, cb) {
console.log(resolution);
// return early for disabled skills
if (resolution.resolution.disable.disabled) return cb();
const group = scene.scene.get('CombatCryps').cryps;
@@ -73,7 +71,7 @@ function animatePhase(scene, game, resolution, cb) {
if (moveSourceBattle) scene.tweens.add(moveSourceBattle);
scene.tweens.add(moveTargetBattle);
scene.time.delayedCall(MOVE_CREEP, () => {
return scene.time.delayedCall(MOVE_CREEP, () => {
const isAlly = resolution.target_team_id !== account.id;
// animate animation
const workingSkills = ['Heal', 'Block'];
+5 -5
View File
@@ -124,11 +124,11 @@ class MenuGameList extends Phaser.Scene {
boss.on('pointerdown', () => {
const team = cryps.filter(c => c.active).map(c => c.id);
if (team.length === 0) return false;
this.scene.add('Missions', Missions);
this.scene.run('Missions');
this.cleanUp();
// return ws.sendGamePve(team, 'Boss');
// if (team.length === 0) return false;
// this.scene.add('Missions', Missions);
// this.scene.run('Missions');
// this.cleanUp();
return ws.sendZoneCreate();
});
+7
View File
@@ -100,6 +100,11 @@ function createSocket(events) {
send({ method: 'item_use', params: { item, target } });
}
function sendZoneCreate() {
send({ method: 'zone_create', params: {} });
}
// -------------
// Incoming
// -------------
@@ -157,6 +162,7 @@ function createSocket(events) {
account_create: accountLogin,
account_cryps: accountCryps,
account_items: accountItems,
zone_create: res => console.log(res),
};
// decodes the cbor and
@@ -232,6 +238,7 @@ function createSocket(events) {
sendCrypLearn,
sendCrypForget,
sendItemUse,
sendZoneCreate,
connect,
};
}