DaFuWeng/assets/Script/MapTile/MapTitleAction.ts

94 lines
2.5 KiB
TypeScript
Raw Normal View History

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