1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import { Vec3 } from "cc";
- export class CosntValue {
- public static EventType_ShowStartGameBg = "ShowStartGameBg";
- public static EventType_RefreshScore = "RefreshScore";
- public static EventType_RefreshLevel = "RefreshLevel";
- public static EventType_TimerChange = "TimerChange";
- public static EventType_NextLv = "NextLv";
- public static EventType_GameOver = "GameOver";
- public static EventType_GameAllOver = "GameAllOver";
- public static EventType_ShowTips = "ShowTips";
- public static Audio_Mm_Cg = "/MemoryMaster/Mm_Cg"
- public static Audio_Mm_Sb = "/MemoryMaster/Mm_Sb"
- public static Audio_Mm_Xz = "/MemoryMaster/Mm_Xz"
- public static Prefab_Mm_Game = "/MemoryMaster/Game"
- public static Audio_Hs_Cg = "/HappyShopping/Hs_Cg"
- public static Audio_Hs_Sb = "/HappyShopping/Hs_Sb"
- public static Audio_Hs_Win = "/HappyShopping/Hs_Win"
- public static Prefab_Hs_Game = "/HappyShopping/Game"
- public static Audio_Sc_Start = "/SkiingChampion/Sc_Start"
- public static Audio_Sc_Win = "/SkiingChampion/Sc_Win"
- public static Audio_Sc_Sb = "/SkiingChampion/Sc_Sb"
- public static Prefab_Sc_Game = "/SkiingChampion/Game"
- public static Audio_Kj_Sb = "/KangarooJump/Kj_Sb"
- public static Audio_Kj_Over = "/KangarooJump/Kj_Over"
- public static Audio_Kj_Jump = "/KangarooJump/Kj_Jump"
- public static Prefab_Kj_Game = "/KangarooJump/Game"
- public static StartLv = 5;
- public static MaxLv = 10;
- public static currGame: Game_type = null;
- public static randomInt(min, max) {
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- public static randomSort(a) {
- return a.sort(() => Math.random() - 0.5);
- }
- //计算贝塞尔曲线坐标函数
- public static twoBezier(t: number, p1: Vec3, cp: Vec3, p2: Vec3) {
- let x = (1 - t) * (1 - t) * p1.x + 2 * t * (1 - t) * cp.x + t * t * p2.x;
- let y = (1 - t) * (1 - t) * p1.y + 2 * t * (1 - t) * cp.y + t * t * p2.y;
- return new Vec3(x, y, 0);
- }
- }
- export enum Hs_ColliderType {
- Player = 1,
- Goods = 2,
- OtherMan = 3,
- }
- export enum Sc_ColliderType {
- Player = 1,
- Obs = 2,
- }
- export enum Game_type {
- None = 0, // 无
- MemoryMaster = 1, // 记忆大师
- HappyShopping = 2, // 快乐大购物
- SkiingChampion = 3, // 滑雪冠军
- KangarooJump = 4, // 袋鼠跳一跳
- }
|