DaFuWeng/assets/Script/MapTile/MapTitleAction.ts

94 lines
2.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* @Author: WoNiu
* @Date: 2024-03-26 11:36:36
* @LastEditTime: 2024-03-29 14:03:36
* @LastEditors: WoNiu
* @Description:
*/
import { LuckyCoinsNode, LuckyType } from "../DialogRoot/LuckyCoinsNode";
import { GameRootSingleton } from "../GameRootController";
/**
* @description: 地图事件
*/
export class MapTitleAction {
// ─── 特殊事件 ────────────────────────────────────────────────────────────
//* 月光酒馆
//* 决斗场
//* 海上列车
//* 幸运硬币
/**
* @description: 幸运硬币事件
*/
static lucky(type: LuckyType) {
// 将幸运硬币动画节点添加到 Dialog 层
const node = new LuckyCoinsNode(type, () => {
LuckyAction.Action(type);
});
GameRootSingleton.getInstance().DialogRootNode.addChild(node);
}
// ─── 怪物事件 ────────────────────────────────────────────────────────────────────
/**
* @description: 怪物事件
*/
static monsterAction() {}
}
/**
* @description: 幸运硬币事件
*/
export class LuckyAction {
static Action(type: LuckyType) {
const lucky = new LuckyAction();
switch (type) {
case LuckyType.GoThree:
lucky.GoThreeAction();
break;
case LuckyType.YeGuangJiuGuan:
lucky.YeGuangJiuGuanAction();
break;
case LuckyType.JueDouChang:
lucky.JueDouChangAction();
break;
case LuckyType.HaiShangLieChe:
lucky.HaiShangLieCheAction();
break;
case LuckyType.Double:
lucky.DoubleAction();
break;
case LuckyType.Halve:
lucky.HalveAction();
break;
case LuckyType.HorseCombat:
lucky.HorseCombatAction();
break;
case LuckyType.Servicing:
lucky.ServicingAction();
break;
case LuckyType.Charge:
lucky.ChargeAction();
break;
}
}
// 前进三格
GoThreeAction() {}
// 移动到月光酒馆
YeGuangJiuGuanAction() {}
// 移动到决斗场
JueDouChangAction() {}
// 移动到海上列车
HaiShangLieCheAction() {}
// 我要双倍点数x2
DoubleAction() {}
// 这是我的钱,点数减半
HalveAction() {}
// 骑士马战 ,点数+2w
HorseCombatAction() {}
// 装备修理, 点数-2w
ServicingAction() {}
// 收取费用,夺取其他人 2w 点数
ChargeAction() {}
}