Commit 6af08fa7 authored by haiyoucuv's avatar haiyoucuv

init

parent 091d49db
......@@ -7,7 +7,7 @@ import { RoleCarColorsSysterm } from './Systerms/RoleCarColorsSysterm';
import { GlobalData, ConfigKeys } from '../../ScriptFrame/GlobalData';
import { CarCarColorsSysterm } from './Systerms/CarCarColorsSysterm';
import { AudioManager } from '../../ScriptFrame/Frame/AudioManager';
import Scene from "db://assets/Module/Scene";
import Scene from "db://assets/core/Module/Scene";
const { ccclass, property } = _decorator;
@ccclass('CarColorsGameEntry')
......
......@@ -4,7 +4,7 @@ import { CarColorsGlobalInstance } from '../CarColorsGlobalInstance';
import { UINames } from '../CarColorsGlobalTypes';
import { ConfigKeys, GlobalData } from '../../../ScriptFrame/GlobalData';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('FailPage')
......
......@@ -6,7 +6,7 @@ import { CarColors, UINames } from '../CarColorsGlobalTypes';
import { GlobalData, ConfigKeys } from '../../../ScriptFrame/GlobalData';
import { PlatformManager } from '../../../ScriptFrame/Frame/platformManager';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('GamePage')
......
......@@ -4,7 +4,7 @@ import { CarColorsGlobalInstance } from '../CarColorsGlobalInstance';
import { UINames } from '../CarColorsGlobalTypes';
import { GlobalData, ConfigKeys } from '../../../ScriptFrame/GlobalData';
import { AudioClipNames, AudioManager } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('HomePage')
......
......@@ -4,7 +4,7 @@ import { UINames } from '../CarColorsGlobalTypes';
import { UIBase } from '../Components/UIBase';
import { PlatformManager } from '../../../ScriptFrame/Frame/platformManager';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('RefreshPage')
......
......@@ -4,7 +4,7 @@ import { CarColorsGlobalInstance } from '../CarColorsGlobalInstance';
import { UINames } from '../CarColorsGlobalTypes';
import { PlatformManager } from '../../../ScriptFrame/Frame/platformManager';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('RevivePage')
......
......@@ -4,7 +4,7 @@ import { UINames } from '../CarColorsGlobalTypes';
import { UIBase } from '../Components/UIBase';
import { PlatformManager } from '../../../ScriptFrame/Frame/platformManager';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('SortPage')
......
......@@ -4,7 +4,7 @@ import { CarColorsGlobalInstance } from '../CarColorsGlobalInstance';
import { UINames } from '../CarColorsGlobalTypes';
import { ConfigKeys, GlobalData } from '../../../ScriptFrame/GlobalData';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('StopPage')
......
......@@ -4,7 +4,7 @@ import { CarColorsGlobalInstance } from '../CarColorsGlobalInstance';
import { UINames } from '../CarColorsGlobalTypes';
import { GlobalData, ConfigKeys } from '../../../ScriptFrame/GlobalData';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('SuccessPage')
......
......@@ -5,7 +5,7 @@ import { UIBase } from '../Components/UIBase';
import { PlatformManager } from '../../../ScriptFrame/Frame/platformManager';
import { GamePage } from './GamePage';
import { AudioManager, AudioClipNames } from '../../../ScriptFrame/Frame/AudioManager';
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
const { ccclass, property } = _decorator;
@ccclass('VipPage')
......
......@@ -2,7 +2,7 @@ import { game, native, sys } from "cc";
import { GlobalData } from "../GlobalData";
import { EDITOR, PREVIEW } from "cc/env";
import { CarColorsGlobalInstance } from "../../CarColorsGame/Scrips/CarColorsGlobalInstance";
import { showToast } from "db://assets/Module/UIFast";
import { showToast } from "db://assets/core/Module/UIFast";
export class PlatformManager {
......
import Panel from "../../Module/Panel";
import Panel from "../../core/Module/Panel";
import { _decorator, Button, game, Node } from "cc";
import store from "../store/store";
import { observer, render } from "../store/decorators";
......
import { _decorator, Button, Node } from "cc";
import Scene from "db://assets/Module/Scene";
import { changeScene, hideWaiting, showPanel, showWaiting } from "db://assets/Module/UIFast";
import Scene from "db://assets/core/Module/Scene";
import { changeScene, hideWaiting, showPanel, showWaiting } from "db://assets/core/Module/UIFast";
import store from "../store/store";
import { observer, render } from "../store/decorators";
import { _asyncThrottle } from "../Utils/Utils";
import { UIMgr } from "../../Module/UIMgr";
import { CarColorsGameEntry } from "db://assets/CarColorsGame/Scrips/CarColorsGameEntry";
const { ccclass, property } = _decorator;
......
import { assetManager, director, ImageAsset, Node, SpriteFrame, Texture2D, tween, UITransform } from "cc";
import Svga from "db://assets/Component/Svga/Svga";
import Svga from "db://assets/core/Component/Svga/Svga";
/**
* 添加url的协议头
......
import { jsonp } from "./web/jsonp";
import { getUrlParams } from "./web/webTools";
import { showToast } from "../../../Module/UIFast";
import { showToast } from "../../../core/Module/UIFast";
import { PREVIEW } from 'cc/env';
import JSON5 from "json5";
......
......@@ -8,7 +8,7 @@ import {
showPanel,
showToast,
showWaiting
} from "../../Module/UIFast";
} from "../../core/Module/UIFast";
import store, { IHomeInfo } from "./store";
import { prefixInteger } from "../Utils/Utils";
import { NetTime } from "../NetTime";
......
......@@ -3,7 +3,7 @@ import { assetManager, ImageAsset, SpriteFrame, Texture2D } from "cc";
import { getUrlParams } from "../Utils/WebNet/web/webTools";
import { sendWebNet, WebNetName } from "../Utils/WebNet/WebNet";
import store from "./store";
import {showShareGuide, showToast} from "../../Module/UIFast";
import {showShareGuide, showToast} from "../../core/Module/UIFast";
const { makeAutoObservable } = mobx;
......
import mobx from "mobx";
import { sendWebNet, sendWebNetWithToken, WebNetName } from "../Utils/WebNet/WebNet";
import { showPanel, showToast } from "../../Module/UIFast";
import { showPanel, showToast } from "../../core/Module/UIFast";
import { getUrlParams } from "../Utils/WebNet/web/webTools";
import { AESDecrypt } from "../Utils/Crypto";
import { PREVIEW } from "cc/env";
......
import { _decorator, Component, Label, lerp, Prefab, ProgressBar, } from "cc";
import { PREVIEW } from "cc/env";
import { UIMgr } from "../Module/UIMgr";
import { changeScene } from "db://assets/Module/UIFast";
import { MusicBtn } from "../Component/MusicBtn/MusicBtn";
import { UIMgr } from "../core/Module/UIMgr";
import { changeScene } from "db://assets/core/Module/UIFast";
import { MusicBtn } from "../core/Component/MusicBtn/MusicBtn";
import ZipLoader from "./ZipLoader";
import store from "../Scripts/store/store";
import { getPreLoadList, preload } from "../Scripts/Utils/LoaderTools";
import { AudioMgr } from "../core_tgx/base/AudioMgr";
import { AudioMgr } from "../core/base/AudioMgr";
import { LOG_TYPE, sendLog } from "../Scripts/Utils/WebNet/WebNet";
import shareStore from "../Scripts/store/shareStore";
import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
......
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "cae9a971-05ca-4f51-98da-0ece38f2e6c1",
"files": [],
"subMetas": {},
"userData": {}
}
......@@ -2,7 +2,7 @@
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "7e510966-c2ba-4c75-9d15-09c591fe0481",
"uuid": "ec76414f-12d0-43d2-b6de-aff6532a52a1",
"files": [],
"subMetas": {},
"userData": {}
......
import { _decorator, Button, Component, Node, Sprite, SpriteFrame } from 'cc';
import { AudioMgr } from "../../core_tgx/base/AudioMgr";
import { AudioMgr } from "../../base/AudioMgr";
const {ccclass, property, requireComponent} = _decorator;
......
import { _decorator, easing, Node, tween, v3 } from "cc";
import Module from "db://assets/Module/Module";
import { hidePanel } from "db://assets/Module/UIFast";
import Module from "./Module";
import { hidePanel } from "./UIFast";
import { loadAllObject } from "db://assets/Scripts/Utils/Utils";
import { UIMgr } from "./UIMgr";
......
import { _decorator } from "cc";
import Module from "db://assets/Module/Module";
import { UILayer } from "db://assets/Module/UILayer";
import Module from "./Module";
import { UILayer } from "./UILayer";
const {ccclass, property} = _decorator;
......
import { UIMgr } from "db://assets/Module/UIMgr";
import Scene from "db://assets/Module/Scene";
import { UIMgr } from "./UIMgr";
import Scene from "./Scene";
export async function changeScene(cls: typeof Scene, data?: any) {
await UIMgr.ins.changeScene(cls, data);
......
......@@ -12,9 +12,9 @@ import {
UITransform,
Widget
} from "cc";
import Scene from "db://assets/Module/Scene";
import Panel from "db://assets/Module/Panel";
import RES from "db://assets/Module/RES";
import Scene from "./Scene";
import Panel from "./Panel";
import RES from "./RES";
export class UIMgr {
......
......@@ -2,7 +2,7 @@
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "7aebb67a-53c0-42ae-965a-bdbe30277e3f",
"uuid": "36279232-b2a3-4f86-b10b-36c68130a377",
"files": [],
"subMetas": {},
"userData": {}
......
//AudioMgr.ts
import { Node, AudioSource, AudioClip, resources, director, assetManager } from 'cc';
......
......@@ -2,7 +2,7 @@
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "d506f08a-1247-4c63-baa4-759594ea27aa",
"uuid": "fa6e281f-1d99-47fb-9f32-37983ff77510",
"files": [],
"subMetas": {},
"userData": {}
......
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "c7398400-3038-4203-9f2a-34001361a00f",
"files": [],
"subMetas": {},
"userData": {}
}
export class InputMgr{
private STATE_NORMAL = 1;
private STATE_KEEP = 2;
private static _inst:InputMgr = null;
private _flags = {};
private _flagsMeta = {};
public static get inst():InputMgr{
if(!this._inst){
this._inst = new InputMgr();
}
return this._inst;
}
public setFlag(flag:string,keep?:boolean,meta?:any){
this._flags[flag] = keep? this.STATE_KEEP:this.STATE_NORMAL;
if(meta != null){
this._flagsMeta[flag] = meta;
}
}
public removeFlag(flag:string){
delete this._flags[flag];
}
public hasFlag(flag:string):boolean{
return !!this._flags[flag];
}
public getMetaByFlag(flag:string):any{
return this._flagsMeta[flag];
}
public update(){
for(let k in this._flags){
if(this._flags[k] != this.STATE_KEEP){
this._flags[k] = 0;
}
}
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "8fac4981-1bc9-4fa3-9c41-df044d19386c",
"files": [],
"subMetas": {},
"userData": {
"moduleId": "project:///assets/scripts/qfw/InputMgr.js",
"importerSettings": 0,
"simulateGlobals": []
}
}
const PROP_MODULE = '__module__name__';
const PROP_IMPL_CLASS = '__impl__class__';
let defaultModule = 'resources';
export class ModuleContext {
public static setDefaultModule(moduleName) {
defaultModule = moduleName;
}
public static getDefaultModule(){
return defaultModule;
}
public static attachModule(cls, moduleName) {
cls[PROP_MODULE] = moduleName;
}
public static getClassModule(cls) {
return cls[PROP_MODULE] || defaultModule;
}
public static attachImplClass(cls, implCls) {
cls[PROP_IMPL_CLASS] = implCls;
}
public static attachModuleAndImplClass(cls, moduleName, implCls) {
cls[PROP_MODULE] = moduleName;
cls[PROP_IMPL_CLASS] = implCls;
}
public static getImplClass(cls) {
return cls[PROP_IMPL_CLASS] || cls;
}
public static createFromModule(cls) {
let implCls = this.getImplClass(cls) || cls;
return new implCls();
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "5575add5-5764-43ef-8ea1-8b5394d57b23",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, view, screen, Size, size, ResolutionPolicy } from 'cc';
const { ccclass, property } = _decorator;
const CHECK_INTERVAL = 0.1;
@ccclass('tgxResolutionAutoFit')
export class ResolutionAutoFit extends Component {
private _oldSize:Size = size();
start() {
this.adjustResolutionPolicy();
}
private lastCheckTime = 0;
update(deltaTime: number) {
this.lastCheckTime+=deltaTime;
if(this.lastCheckTime < CHECK_INTERVAL){
return;
}
this.lastCheckTime = 0;
this.adjustResolutionPolicy();
}
adjustResolutionPolicy(){
let winSize = screen.windowSize;
if(!this._oldSize.equals(winSize)){
let ratio = winSize.width / winSize.height;
let drs = view.getDesignResolutionSize();
let drsRatio = drs.width / drs.height;
if(ratio > drsRatio){
//wider than desgin. fixed height
view.setResolutionPolicy(ResolutionPolicy.FIXED_HEIGHT);
}
else{
//
view.setResolutionPolicy(ResolutionPolicy.FIXED_WIDTH);
}
this._oldSize.set(winSize);
}
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "e5d8a223-5fd3-4ede-8c77-28c5930dbb00",
"files": [],
"subMetas": {},
"userData": {}
}
import { loader, Constructor, resources, Asset } from "cc";
class ResItem {
public url: string;
public isLoading = false;
public callbackArr = [];
}
export class ResourceMgr {
private static _inst: ResourceMgr = null;
public static get inst(): ResourceMgr {
if (!this._inst) {
this._inst = new ResourceMgr();
}
return this._inst;
}
private loadingQueue:[] = [];
public loadRes<T>(url: string, type: any, callback: (err, assets: T) => void) {
let cache = resources.get(url,type) as any;
if(cache){
if(callback){
setTimeout(()=>{
callback(null,cache);
},10);
}
return;
}
let loadingItem:ResItem = this.loadingQueue[url];
if(!loadingItem){
loadingItem = this.loadingQueue[url] = new ResItem();
loadingItem.url = url;
}
loadingItem.callbackArr.push(callback);
if(!loadingItem.isLoading){
loadingItem.isLoading = true;
resources.load(url, type, (err,asset:Asset)=>{
delete this.loadingQueue[url];
for(let k in loadingItem.callbackArr){
let cb = loadingItem.callbackArr[k];
if(cb){
cb(err,asset);
}
}
});
}
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "b666c2cf-c69b-456e-adc2-73d54d34f216",
"files": [],
"subMetas": {},
"userData": {
"moduleId": "project:///assets/scripts/qfw/ResourceMgr.js",
"importerSettings": 0,
"simulateGlobals": []
}
}
/**
* @en call JSON mthods safely.
* @zh 用于安全操作JSON相关函数
* */
export class SafeJSON {
public static parse(text: string, reciver?: (key: any, value: any) => any): any {
try {
return JSON.parse(text, reciver);
} catch (error) {
console.log(error);
return null;
}
}
public static stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number) {
try {
return JSON.stringify(value, replacer, space);
} catch (error) {
return '';
}
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "2aad897f-5b30-4f4c-886b-d56e9207d3ed",
"files": [],
"subMetas": {},
"userData": {
"moduleId": "project:///assets/scripts/qfw/SafeJSON.js",
"importerSettings": 0,
"simulateGlobals": []
}
}
import { assetManager, director, AssetManager } from "cc";
export interface ISceneInfo {
name: string;
bundle?: string;
}
export class SceneUtil {
static async reloadScene(){
return new Promise((resolve, reject) => {
director.loadScene(director.getScene().name,()=>{
resolve(true);
});
});
}
static async loadScene(scene: ISceneInfo) {
return new Promise((resolve, reject) => {
let bundle = assetManager.getBundle(scene.bundle);
if (bundle) {
director.loadScene(scene.name, () => {
resolve(true);
});
}
else {
assetManager.loadBundle(scene.bundle, (err, bundle: AssetManager.Bundle) => {
if (bundle) {
director.loadScene(scene.name, () => {
resolve(true);
});
}
})
}
});
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "a97b967d-fe2c-4dde-8d45-2d5a86a5f13d",
"files": [],
"subMetas": {},
"userData": {}
}
function urlParse() {
var params = {};
if (!window.location) {
return params;
}
var name, value;
var str = window.location.href; //取得整个地址栏
var num = str.indexOf("?")
str = str.substring(num + 1); //取得所有参数 stringvar.substr(start [, length ]
var arr = str.split("&"); //各个参数放到数组里
for (var i = 0; i < arr.length; i++) {
num = arr[i].indexOf("=");
if (num > 0) {
name = arr[i].substring(0, num);
value = arr[i].substr(num + 1);
params[name] = value;
}
}
return params;
}
export { urlParse };
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "bac652f9-42bf-433a-9ef3-6afec99d8688",
"files": [],
"subMetas": {},
"userData": {}
}
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "9367cd25-eba1-450a-9f68-48045b442197",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('tgxFPSCamera')
export class FPSCamera extends Component {
start() {
}
update(deltaTime: number) {
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "35e790f2-e054-4aa2-9c28-c5ba9f3d4048",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node, Vec3, v3, Camera } from 'cc';
const { ccclass, property } = _decorator;
const tmpV3 = v3();
@ccclass('tgxFollowCamera2D')
export class FollowCamera2D extends Component {
@property(Node)
target:Node;
@property
offset:Vec3 = v3();
protected _camera:Camera;
start() {
this._camera = this.node.getComponent(Camera);
}
lateUpdate(deltaTime: number) {
this.target.getWorldPosition(tmpV3);
tmpV3.add(this.offset);
this.node.worldPosition = tmpV3;
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "901c8f11-ccf3-42f8-acd8-6387356f2369",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Quat, Vec2, Vec3, Input, game, EventTouch, EventMouse, input, EventKeyboard, KeyCode, v2 } from 'cc';
const { ccclass, property } = _decorator;
const v2_1 = new Vec2();
const v2_2 = new Vec2();
const v3_1 = new Vec3();
const qt_1 = new Quat();
const forward = new Vec3();
const right = new Vec3();
@ccclass('tgxFreeCamera')
export class FreeCamera extends Component {
@property
public moveSpeed = 1;
@property
public moveSpeedShiftScale = 5;
@property({ slide: true, range: [0.05, 0.5, 0.01] })
public damp = 0.2;
@property
public rotateSpeed = 1;
private _euler = new Vec3();
private _velocity = new Vec3();
private _position = new Vec3();
private _speedScale = 1;
private _eulerP = new Vec3();
public onLoad () {
input.on(Input.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
input.on(Input.EventType.TOUCH_START, this.onTouchStart, this);
input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this);
input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this);
Vec3.copy(this._euler, this.node.eulerAngles);
Vec3.copy(this._position, this.node.getPosition());
Vec3.copy(this._eulerP, this.node.eulerAngles);
input.on(Input.EventType.KEY_DOWN, this.onKeyDown, this);
input.on(Input.EventType.KEY_UP, this.onKeyUp, this);
}
public onDestroy () {
input.off(Input.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
input.off(Input.EventType.TOUCH_START, this.onTouchStart, this);
input.off(Input.EventType.TOUCH_MOVE, this.onTouchMove, this);
input.off(Input.EventType.TOUCH_END, this.onTouchEnd, this);
input.off(Input.EventType.KEY_DOWN, this.onKeyDown, this);
input.off(Input.EventType.KEY_UP, this.onKeyUp, this);
}
public update (dt: number) {
const t = Math.min(dt / this.damp, 1);
// position
Vec3.transformQuat(v3_1, this._velocity, this.node.rotation);
Vec3.scaleAndAdd(this._position, this._position, v3_1, this.moveSpeed * this._speedScale);
Vec3.lerp(v3_1, this.node.getPosition(), this._position, t);
this.node.setPosition(v3_1);
if(this.moveDir.lengthSqr()){
Vec3.transformQuat(forward, Vec3.FORWARD, this.node.rotation);
forward.normalize();
Vec3.cross(right, forward, Vec3.UP);
right.normalize();
Vec3.scaleAndAdd(this._position, this._position, forward, this.moveSpeed * this._speedScale * this.moveDir.z);
Vec3.lerp(v3_1, this.node.getPosition(), this._position, t);
this.node.setPosition(v3_1);
Vec3.scaleAndAdd(this._position, this._position, right, this.moveSpeed * this._speedScale * this.moveDir.x);
Vec3.lerp(v3_1, this.node.getPosition(), this._position, t);
this.node.setPosition(v3_1);
Vec3.scaleAndAdd(this._position, this._position, Vec3.UP, this.moveSpeed * this._speedScale * this.moveDir.y);
Vec3.lerp(v3_1, this.node.getPosition(), this._position, t);
this.node.setPosition(v3_1);
}
// rotation
Quat.fromEuler(qt_1, this._eulerP.x, this._eulerP.y, this._eulerP.z);
Quat.slerp(qt_1, this.node.rotation, qt_1, t);
this.node.setWorldRotationFromEuler(this._eulerP.x, this._eulerP.y, this._eulerP.z);
}
public onMouseWheel (e: EventMouse) {
const delta = -e.getScrollY() * this.moveSpeed * 0.1; // delta is positive when scroll down
Vec3.transformQuat(v3_1, Vec3.UNIT_Z, this.node.rotation);
Vec3.scaleAndAdd(this._position, this.node.position, v3_1, delta);
}
public onTouchStart (e: EventTouch) {
if (game.canvas.requestPointerLock) { game.canvas.requestPointerLock(); }
}
public onTouchMove (e: EventTouch) {
e.getStartLocation(v2_1);
if (v2_1.x > game.canvas.width * 0.4) { // rotation
e.getDelta(v2_2);
this._eulerP.y -= v2_2.x * this.rotateSpeed * 0.1;
this._eulerP.x += v2_2.y * this.rotateSpeed * 0.1;
} else { // position
e.getDelta(v2_2);
this._eulerP.y -= v2_2.x * this.rotateSpeed * 0.1;
this._eulerP.x += v2_2.y * this.rotateSpeed * 0.1;
}
}
public onTouchEnd (e: EventTouch) {
if (document.exitPointerLock) { document.exitPointerLock(); }
e.getStartLocation(v2_1);
if (v2_1.x < game.canvas.width * 0.4) { // position
this._velocity.x = 0;
this._velocity.z = 0;
}
}
private keys = [];
// x -1 left, +1 right y -1 backword, +1 forward
private moveDir:Vec3 = new Vec3();
onKeyDown(event:EventKeyboard){
let keyCode = event.keyCode;
if(keyCode == KeyCode.KEY_A || keyCode == KeyCode.KEY_S || keyCode == KeyCode.KEY_D || keyCode == KeyCode.KEY_W){
if(this.keys.indexOf(keyCode) == -1){
this.keys.push(keyCode);
this.updateDirection();
}
}
if(keyCode == KeyCode.KEY_Q){
this.moveDir.y = -1;
}
else if(keyCode == KeyCode.KEY_E){
this.moveDir.y = 1;
}
}
onKeyUp(event:EventKeyboard){
let keyCode = event.keyCode;
if(keyCode == KeyCode.KEY_A || keyCode == KeyCode.KEY_S || keyCode == KeyCode.KEY_D || keyCode == KeyCode.KEY_W){
let index = this.keys.indexOf(keyCode);
if(index != -1){
this.keys.splice(index,1);
this.updateDirection();
}
}
if(keyCode == KeyCode.KEY_Q || keyCode == KeyCode.KEY_E){
this.moveDir.y = 0;
}
}
private key2dirMap = null;
updateDirection(){
if(this.key2dirMap == null){
this.key2dirMap = {};
this.key2dirMap[0] = v2(0,0);
this.key2dirMap[KeyCode.KEY_A] = v2(-1,0);
this.key2dirMap[KeyCode.KEY_D] = v2(1,0);
this.key2dirMap[KeyCode.KEY_W] = v2(0,1);
this.key2dirMap[KeyCode.KEY_S] = v2(0,-1);
this.key2dirMap[KeyCode.KEY_A * 1000 + KeyCode.KEY_W] = this.key2dirMap[KeyCode.KEY_W * 1000 + KeyCode.KEY_A] = v2(-1,1);
this.key2dirMap[KeyCode.KEY_D * 1000 + KeyCode.KEY_W] = this.key2dirMap[KeyCode.KEY_W * 1000 + KeyCode.KEY_D] = v2(1,1);
this.key2dirMap[KeyCode.KEY_A * 1000 + KeyCode.KEY_S] = this.key2dirMap[KeyCode.KEY_S * 1000 + KeyCode.KEY_A] = v2(-1,-1);
this.key2dirMap[KeyCode.KEY_D * 1000 + KeyCode.KEY_S] = this.key2dirMap[KeyCode.KEY_S * 1000 + KeyCode.KEY_D] = v2(1,-1);
this.key2dirMap[KeyCode.KEY_A * 1000 + KeyCode.KEY_D] = this.key2dirMap[KeyCode.KEY_D];
this.key2dirMap[KeyCode.KEY_D * 1000 + KeyCode.KEY_A] = this.key2dirMap[KeyCode.KEY_A];
this.key2dirMap[KeyCode.KEY_W * 1000 + KeyCode.KEY_S] = this.key2dirMap[KeyCode.KEY_S];
this.key2dirMap[KeyCode.KEY_S * 1000 + KeyCode.KEY_W] = this.key2dirMap[KeyCode.KEY_W];
}
let keyCode0 = this.keys[this.keys.length - 1] || 0;
let keyCode1 = this.keys[this.keys.length - 2] || 0;
let dir = this.key2dirMap[keyCode1 * 1000 + keyCode0];
this.moveDir.x = dir.x;
this.moveDir.z = dir.y;
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "9cfdb127-a2c7-4370-8579-d7fa8a368052",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node, Vec3, v3 } from 'cc';
const { ccclass, property } = _decorator;
const v3_1 = v3();
const v3_2 = v3();
const ROTATION_STRENGTH = 20.0;
@ccclass('tgxThirdPersonCamera')
export class ThirdPersonCamera extends Component {
@property(Node)
target: Node;
@property
lookAtOffset: Vec3 = v3();
@property
zoomSensitivity: number = 1.0;
@property
lenMin: number = 1.0;
@property
lenMax: number = 10.0;
@property
len: number = 5;
@property
rotateVHSeparately: boolean = false;
@property
tweenTime:number = 0.2;
protected _targetLen: number = 0;
protected _targetAngles: Vec3 = v3();
start(){
this._targetLen = this.len;
this._targetAngles.set(this.node.eulerAngles);
}
setLenFactor(factor: number) {
let len = (this.lenMax - this.lenMin) * factor + this.lenMin;
this._targetLen = len;
}
setTargetAngles(x: number, y: number, z: number) {
this._targetAngles.set(x, y, z);
}
lateUpdate(deltaTime: number) {
if (!this.target) {
return;
}
const t = Math.min(deltaTime / this.tweenTime, 1.0);
//rotation
v3_1.set(this.node.eulerAngles);
Vec3.lerp(v3_1, v3_1, this._targetAngles, t);
this.node.setRotationFromEuler(v3_1);
//lookat
v3_1.set(this.target.worldPosition);
v3_1.add(this.lookAtOffset);
//len and position
this.len = this.len * (1.0 - t) + this._targetLen * t;
v3_2.set(this.node.forward);
v3_2.multiplyScalar(this.len);
v3_1.subtract(v3_2);
this.node.setPosition(v3_1);
}
onCameraRotate(deltaX: number, deltaY: number) {
let eulerAngles = this.node.eulerAngles;
if (this.rotateVHSeparately) {
if (Math.abs(deltaX) > Math.abs(deltaY)) {
deltaY = 0;
}
else {
deltaX = 0;
}
}
this._targetAngles.set(eulerAngles.x + deltaX * ROTATION_STRENGTH, eulerAngles.y + deltaY * ROTATION_STRENGTH, eulerAngles.z);
}
onCameraZoom(delta: number) {
this._targetLen += delta * this.zoomSensitivity;
if (this._targetLen < this.lenMin) {
this._targetLen = this.lenMin;
}
if (this._targetLen > this.lenMax) {
this._targetLen = this.lenMax;
}
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "0e5acc99-d55e-4cc1-8e0c-5d662625e3b6",
"files": [],
"subMetas": {},
"userData": {}
}
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "c97adc44-66ee-4fc5-9662-05e8e2c63051",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node, v3, RigidBody, Vec3, find, Camera, SkeletalAnimation,Animation, AnimationClip, Collider, ICollisionEvent } from 'cc';
import { EasyController, EasyControllerEvent } from './EasyController';
const { ccclass, property } = _decorator;
const v3_1 = v3();
@ccclass('tgxCharacterMovement')
export class CharacterMovement extends Component {
@property(Camera)
mainCamera: Camera;
@property
velocity = 1.0;
@property
jumpVelocity = 1.0;
@property
maxJumpTimes: number = 0;
private _curJumpTimes: number = 0;
@property(AnimationClip)
idleAnimClip: AnimationClip;
@property(AnimationClip)
moveAnimClip: AnimationClip;
@property(AnimationClip)
jumpBeginAnimClip: AnimationClip;
@property(AnimationClip)
jumpLoopAnimClip: AnimationClip;
@property(AnimationClip)
jumpLandAnimClip: AnimationClip;
_rigidBody: RigidBody;
_isMoving: boolean = false;
_velocityScale: number = 1.0;
_isInTheAir: boolean = false;
_currentVerticalVelocity: number = 0.0;
private _anim: Animation;
start() {
if (!this.mainCamera) {
this.mainCamera = find('Main Camera')?.getComponent(Camera);
}
this._rigidBody = this.node.getComponent(RigidBody);
this._anim = this.node.getComponent(Animation);
if (this._anim) {
let clipArr = [
this.idleAnimClip,
this.moveAnimClip,
this.jumpBeginAnimClip,
this.jumpLoopAnimClip,
this.jumpLandAnimClip
];
for (let i = 0; i < clipArr.length; ++i) {
let clip = clipArr[i];
if (clip) {
if (!this._anim.getState(clip.name)) {
this._anim.addClip(clip);
}
}
}
if (this.idleAnimClip) {
this._anim.play(this.idleAnimClip.name);
}
}
EasyController.on(EasyControllerEvent.MOVEMENT, this.onMovement, this);
EasyController.on(EasyControllerEvent.MOVEMENT_STOP, this.onMovementRelease, this);
EasyController.on(EasyControllerEvent.BUTTON, this.onJump, this);
let myCollider = this.getComponent(Collider);
myCollider?.on('onCollisionEnter',(target:ICollisionEvent)=>{
if(target.otherCollider != target.selfCollider){
this.onLand();
}
});
}
onDestroy() {
EasyController.off(EasyControllerEvent.MOVEMENT, this.onMovement, this);
EasyController.off(EasyControllerEvent.MOVEMENT_STOP, this.onMovementRelease, this);
EasyController.off(EasyControllerEvent.MOVEMENT_STOP, this.onJump, this);
}
update(deltaTime: number) {
if (this._isMoving) {
this._tmp.set(this.node.forward);
this._tmp.multiplyScalar(-1.0);
this._tmp.multiplyScalar(this.velocity * this._velocityScale);
if (this._rigidBody) {
this._rigidBody.getLinearVelocity(v3_1);
this._tmp.y = v3_1.y;
this._rigidBody.setLinearVelocity(this._tmp);
}
else {
this._tmp.multiplyScalar(deltaTime);
this._tmp.add(this.node.position);
this.node.setPosition(this._tmp);
}
}
if (this._isInTheAir) {
if(this.jumpBeginAnimClip && this._anim){
let state = this._anim.getState(this.jumpBeginAnimClip.name);
if(state.isPlaying && state.current >= state.duration){
if(this.jumpLoopAnimClip){
this._anim.crossFade(this.jumpLoopAnimClip.name);
}
}
}
if(!this._rigidBody){
this._currentVerticalVelocity -= 9.8 * deltaTime;
let oldPos = this.node.position;
let nextY = oldPos.y + this._currentVerticalVelocity * deltaTime;
if (nextY <= 0) {
this.onLand();
nextY = 0.0;
}
this.node.setPosition(oldPos.x, nextY, oldPos.z);
}
}
}
onLand(){
this._isInTheAir = false;
this._currentVerticalVelocity = 0.0;
this._curJumpTimes = 0;
if (this.moveAnimClip) {
if(this._isMoving){
this._anim.crossFade(this.moveAnimClip.name, 0.5);
}
else{
this._anim.crossFade(this.idleAnimClip.name, 0.5);
}
}
}
private _tmp = v3();
onMovement(degree: number, offset: number) {
let cameraRotationY = 0;
if (this.mainCamera) {
cameraRotationY = this.mainCamera.node.eulerAngles.y;
}
this._velocityScale = offset;
//2D界面是 正X 为 0, 3D场景是 正前方为0,所以需要 - 90 度。(顺时针转90度)
this._tmp.set(0, cameraRotationY + degree - 90 + 180, 0);
this.node.setRotationFromEuler(this._tmp);
if (this._anim) {
if (!this._isMoving && !this._isInTheAir) {
if (this.moveAnimClip) {
this._anim.crossFade(this.moveAnimClip.name, 0.1);
}
}
if (this.moveAnimClip) {
this._anim.getState(this.moveAnimClip.name).speed = this._velocityScale;
}
}
this._isMoving = true;
}
onMovementRelease() {
if (!this._isInTheAir && this.idleAnimClip) {
this._anim?.crossFade(this.idleAnimClip.name, 0.5);
}
this._isMoving = false;
if (this._rigidBody) {
this._rigidBody.setLinearVelocity(Vec3.ZERO);
}
}
onJump(btnName:string) {
console.log(btnName);
if(btnName != 'btn_slot_0'){
return;
}
if (this._curJumpTimes >= this.maxJumpTimes) {
return;
}
if(this._curJumpTimes == 0 || true){
if(this.jumpBeginAnimClip){
this._anim?.crossFade(this.jumpBeginAnimClip.name);
}
}
this._curJumpTimes++;
if(this._rigidBody){
this._rigidBody.getLinearVelocity(v3_1);
v3_1.y = this.jumpVelocity;
this._rigidBody.setLinearVelocity(v3_1);
}
else{
this._currentVerticalVelocity = this.jumpVelocity;
}
this._isInTheAir = true;
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "d197a4ec-eefd-4692-9c32-a5d2757b327c",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node, Vec2, v2, Prefab, Vec3 } from 'cc';
import { EasyController, EasyControllerEvent } from './EasyController';
const { ccclass, property } = _decorator;
const tempV2 = v2();
@ccclass('tgxCharacterMovement2D')
export class CharacterMovement2D extends Component {
@property
moveSpeed: number = 100;
@property
needRotation: boolean = false;
start() {
EasyController.on(EasyControllerEvent.MOVEMENT, this.onMovement, this);
EasyController.on(EasyControllerEvent.MOVEMENT_STOP, this.onMovementStop, this);
}
private _moveFactor: number = 0;
private _moveDir: Vec2 = v2(1, 0);
public get moveDir(): Vec2 {
return this._moveDir;
}
public getRealSpeed(): number {
return this.moveSpeed * this._moveFactor;
}
onMovement(degree: number, strengthen: number) {
let angle = degree / 180 * Math.PI;
if (this.needRotation) {
this.node.setRotationFromEuler(0, 0, degree);
}
this._moveDir.set(Math.cos(angle), Math.sin(angle));
this._moveDir.normalize();
this._moveFactor = strengthen;
}
onMovementStop() {
this._moveFactor = 0;
}
onDestroy() {
EasyController.off(EasyControllerEvent.MOVEMENT, this.onMovement, this);
EasyController.off(EasyControllerEvent.MOVEMENT_STOP, this.onMovementStop, this);
}
update(deltaTime: number) {
if (this._moveFactor) {
Vec2.multiplyScalar(tempV2, this._moveDir, this.getRealSpeed() * deltaTime);
let pos = this.node.position;
this.node.setPosition(pos.x + tempV2.x, pos.y + tempV2.y, pos.z);
}
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "6bdfadd8-330d-4fc2-86d7-76357e6964d7",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, director } from 'cc';
export class EasyControllerEvent{
/**
* Dispatched when camera rotating
* @params rx: horizontal rotation
* @params ry: vertical rotation.
*/
public static CAMERA_ROTATE:string = 'EasyControllerEvent.CAMERA_ROTATE';
/**
* Dispatched when camera zooming
* @params delta: amount of camera zoom
*/
public static CAMERA_ZOOM:string = 'EasyControllerEvent.CAMERA_ZOOM';
/**
* Dispatched when the movement controller is moving
* @param degree: direction in degrees, with positive X-axis as 0, increasing in a counter-clockwise direction.
* @param strength: movement strength, [0.0, 1.0], can be used for fine-tuning the movement speed.
*/
public static MOVEMENT:string = 'EasyControllerEvent.MOVEMENT';
/**
* Dispatched when the movement controller stops moving
*/
public static MOVEMENT_STOP:string = 'EasyControllerEvent.MOVEMENT_STOP';
/**
* Dispatched when one of the buttons is pressed.
* @param buttonName: string, indicates which button is pressed.
*/
public static BUTTON:string = 'EasyControllerEvent.BUTTON';
/**
* Dispatched when screen is touched.
*/
public static SCREEN_TOUCH_START:string = 'EasyControllerEvent.SCREEN_TOUCH_START';
/**
* Dispatched when screen is touched end.
*/
public static SCREEN_TOUCH_END:string = 'EasyControllerEvent.SCREEN_TOUCH_END';
}
export class EasyController{
public static on(type:string,callback:Function,target?:any){
director.getScene().on(type,callback,target);
}
public static off(type:string,callback?:Function,target?:any){
director.getScene()?.off(type,callback,target);
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "cc9338a3-89a7-411b-8ec6-67ad715c0e76",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node } from 'cc';
import { ThirdPersonCamera } from '../easy_camera/ThirdPersonCamera';
import { EasyController, EasyControllerEvent } from './EasyController';
const { ccclass, property } = _decorator;
@ccclass('tgxThirdPersonCameraCtrl')
export class ThirdPersonCameraCtrl extends ThirdPersonCamera {
start() {
EasyController.on(EasyControllerEvent.CAMERA_ROTATE, this.onCameraRotate, this);
EasyController.on(EasyControllerEvent.CAMERA_ZOOM, this.onCameraZoom, this);
this._targetLen = this.len;
this._targetAngles.set(this.node.eulerAngles);
}
onDestroy() {
EasyController.off(EasyControllerEvent.CAMERA_ROTATE, this.onCameraRotate, this);
EasyController.off(EasyControllerEvent.CAMERA_ZOOM, this.onCameraZoom, this);
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "6ea3c115-de49-4801-99f3-f80cbaeaeb7e",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Node, EventTouch, Touch, Component, UITransform, Input, EventKeyboard, KeyCode, v2, Vec3, input, Scene, director, EventMouse, macro, view, screen, isValid } from 'cc';
import { EasyControllerEvent } from './EasyController';
const { ccclass, property } = _decorator;
/****
* split screen into three parts.
* ---------------------------------------------
* |
* 1.camera rotation zone |
* |
*----------------------------------------------|
* | |
* 2.movement ctrl zone | 3.camera rotation zone|
* | |
* ----------------------------------------------
*
* multi-touch for camera zoom.
* */
@ccclass('tgxUI_Joystick')
export class UI_Joystick extends Component {
private static _inst: UI_Joystick = null;
public static get inst(): UI_Joystick {
return this._inst;
}
private _ctrlRoot: UITransform = null;
private _ctrlPointer: Node = null;
private _checkerCamera: UITransform = null;
private _buttons: Node = null;
private _cameraSensitivity: number = 0.1;
private _distanceOfTwoTouchPoint: number = 0;
private _movementTouch: Touch = null;
private _cameraTouchA: Touch = null;
private _cameraTouchB: Touch = null;
private _scene: Scene = null;
private _key2buttonMap = {};
protected onLoad(): void {
UI_Joystick._inst = this;
this._key2buttonMap[KeyCode.KEY_J] = 'btn_slot_0';
this._key2buttonMap[KeyCode.KEY_K] = 'btn_slot_1';
this._key2buttonMap[KeyCode.KEY_L] = 'btn_slot_2';
this._key2buttonMap[KeyCode.KEY_U] = 'btn_slot_3';
this._key2buttonMap[KeyCode.KEY_I] = 'btn_slot_4';
let checkerCamera = this.node.getChildByName('checker_camera').getComponent(UITransform);
checkerCamera.node.on(Input.EventType.TOUCH_START, this.onTouchStart_CameraCtrl, this);
checkerCamera.node.on(Input.EventType.TOUCH_MOVE, this.onTouchMove_CameraCtrl, this);
checkerCamera.node.on(Input.EventType.TOUCH_END, this.onTouchUp_CameraCtrl, this);
checkerCamera.node.on(Input.EventType.TOUCH_CANCEL, this.onTouchUp_CameraCtrl, this);
let checkerMovement = this.node.getChildByName('checker_movement').getComponent(UITransform);
checkerMovement.node.on(Input.EventType.TOUCH_START, this.onTouchStart_Movement, this);
checkerMovement.node.on(Input.EventType.TOUCH_MOVE, this.onTouchMove_Movement, this);
checkerMovement.node.on(Input.EventType.TOUCH_END, this.onTouchUp_Movement, this);
checkerMovement.node.on(Input.EventType.TOUCH_CANCEL, this.onTouchUp_Movement, this);
this._checkerCamera = checkerCamera;
this._ctrlRoot = this.node.getChildByName('ctrl').getComponent(UITransform);
this._ctrlRoot.node.active = false;
this._ctrlPointer = this._ctrlRoot.node.getChildByName('pointer');
this._buttons = this.node.getChildByName('buttons');
input.on(Input.EventType.KEY_DOWN, this.onKeyDown, this);
input.on(Input.EventType.KEY_UP, this.onKeyUp, this);
input.on(Input.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
this._scene = director.getScene();
}
onDestroy() {
input.off(Input.EventType.KEY_DOWN, this.onKeyDown, this);
input.off(Input.EventType.KEY_UP, this.onKeyUp, this);
input.off(Input.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
this._scene = null;
UI_Joystick._inst = null;
}
cleanKeyMap() {
this._key2buttonMap = {};
}
bindKeyToButton(keyCode: KeyCode, btnName: string) {
this._key2buttonMap[keyCode] = btnName;
}
setButtonVisible(btnName: string, visible: boolean) {
let node = this._buttons?.getChildByName(btnName);
if (node) {
node.active = visible;
}
}
getButtonByName(btnName: string): Node {
return this._buttons.getChildByName(btnName);
}
onTouchStart_Movement(event: EventTouch) {
let touches = event.getTouches();
for (let i = 0; i < touches.length; ++i) {
let touch = touches[i];
let x = touch.getUILocationX();
let y = touch.getUILocationY();
if (!this._movementTouch) {
//we sub halfWidth,halfHeight here.
//because, the touch event use left bottom as zero point(0,0), ui node use the center of screen as zero point(0,0)
//this._ctrlRoot.setPosition(x - halfWidth, y - halfHeight, 0);
let halfWidth = this._checkerCamera.width / 2;
let halfHeight = this._checkerCamera.height / 2;
this._ctrlRoot.node.active = true;
this._ctrlRoot.node.setPosition(x - halfWidth, y - halfHeight, 0);
this._ctrlPointer.setPosition(0, 0, 0);
this._movementTouch = touch;
}
}
}
onTouchMove_Movement(event: EventTouch) {
let touches = event.getTouches();
for (let i = 0; i < touches.length; ++i) {
let touch = touches[i];
if (this._movementTouch && touch.getID() == this._movementTouch.getID()) {
let halfWidth = this._checkerCamera.width / 2;
let halfHeight = this._checkerCamera.height / 2;
let x = touch.getUILocationX();
let y = touch.getUILocationY();
let pos = this._ctrlRoot.node.position;
let ox = x - halfWidth - pos.x;
let oy = y - halfHeight - pos.y;
let len = Math.sqrt(ox * ox + oy * oy);
if (len <= 0) {
return;
}
let dirX = ox / len;
let dirY = oy / len;
let radius = this._ctrlRoot.width / 2;
if (len > radius) {
len = radius;
ox = dirX * radius;
oy = dirY * radius;
}
this._ctrlPointer.setPosition(ox, oy, 0);
// degree 0 ~ 360 based on x axis.
let degree = Math.atan(dirY / dirX) / Math.PI * 180;
if (dirX < 0) {
degree += 180;
}
else {
degree += 360;
}
this.emitEvent(EasyControllerEvent.MOVEMENT, degree, len / radius);
}
}
}
onTouchUp_Movement(event: EventTouch) {
let touches = event.getTouches();
for (let i = 0; i < touches.length; ++i) {
let touch = touches[i];
if (this._movementTouch && touch.getID() == this._movementTouch.getID()) {
this.emitEvent(EasyControllerEvent.MOVEMENT_STOP);
this._movementTouch = null;
this._ctrlRoot.node.active = false;
}
}
}
private getDistOfTwoTouchPoints(): number {
let touchA = this._cameraTouchA;
let touchB = this._cameraTouchB;
if (!touchA || !touchB) {
return 0;
}
let dx = touchA.getLocationX() - touchB.getLocationX();
let dy = touchB.getLocationY() - touchB.getLocationY();
return Math.sqrt(dx * dx + dy * dy);
}
private onTouchStart_CameraCtrl(event: EventTouch) {
this.emitEvent(EasyControllerEvent.SCREEN_TOUCH_START, event);
let touches = event.getAllTouches();
this._cameraTouchA = null;
this._cameraTouchB = null;
for (let i = touches.length - 1; i >= 0; i--) {
let touch = touches[i];
if (this._movementTouch && touch.getID() == this._movementTouch.getID()) {
continue;
}
if (this._cameraTouchA == null) {
this._cameraTouchA = touches[i];
}
else if (this._cameraTouchB == null) {
this._cameraTouchB = touches[i];
break;
}
}
this._distanceOfTwoTouchPoint = this.getDistOfTwoTouchPoints();
}
private onTouchMove_CameraCtrl(event: EventTouch) {
let touches = event.getTouches();
for (let i = 0; i < touches.length; ++i) {
let touch = touches[i];
let touchID = touch.getID();
//two touches, do camera zoom.
if (this._cameraTouchA && this._cameraTouchB) {
console.log(touchID, this._cameraTouchA.getID(), this._cameraTouchB.getID());
let needZoom = false;
if (touchID == this._cameraTouchA.getID()) {
this._cameraTouchA = touch;
needZoom = true;
}
if (touchID == this._cameraTouchB.getID()) {
this._cameraTouchB = touch;
needZoom = true;
}
if (needZoom) {
let newDist = this.getDistOfTwoTouchPoints();
let delta = this._distanceOfTwoTouchPoint - newDist;
this.emitEvent(EasyControllerEvent.CAMERA_ZOOM, delta);
this._distanceOfTwoTouchPoint = newDist;
}
}
//only one touch, do camera rotate.
else if (this._cameraTouchA && touchID == this._cameraTouchA.getID()) {
let dt = touch.getDelta();
let rx = dt.y * this._cameraSensitivity;
let ry = -dt.x * this._cameraSensitivity;
this.emitEvent(EasyControllerEvent.CAMERA_ROTATE, rx, ry);
}
}
}
private onTouchUp_CameraCtrl(event: EventTouch) {
this.emitEvent(EasyControllerEvent.SCREEN_TOUCH_END, event);
let touches = event.getAllTouches();
let hasTouchA = false;
let hasTouchB = false;
for (let i = 0; i < touches.length; ++i) {
let touch = touches[i];
let touchID = touch.getID();
if (this._cameraTouchA && touchID == this._cameraTouchA.getID()) {
hasTouchA = true;
}
else if (this._cameraTouchB && touchID == this._cameraTouchB.getID()) {
hasTouchB = true;
}
}
if (!hasTouchA) {
this._cameraTouchA = null;
}
if (!hasTouchB) {
this._cameraTouchB = null;
}
}
private _keys = [];
private _degree: number = 0;
onKeyDown(event: EventKeyboard) {
let keyCode = event.keyCode;
if (keyCode == KeyCode.KEY_A || keyCode == KeyCode.KEY_S || keyCode == KeyCode.KEY_D || keyCode == KeyCode.KEY_W) {
if (this._keys.indexOf(keyCode) == -1) {
this._keys.push(keyCode);
this.updateDirection();
}
}
else {
let btnName = this._key2buttonMap[keyCode];
if (btnName) {
this.emitEvent(EasyControllerEvent.BUTTON, btnName);
}
}
}
onKeyUp(event: EventKeyboard) {
let keyCode = event.keyCode;
if (keyCode == KeyCode.KEY_A || keyCode == KeyCode.KEY_S || keyCode == KeyCode.KEY_D || keyCode == KeyCode.KEY_W) {
let index = this._keys.indexOf(keyCode);
if (index != -1) {
this._keys.splice(index, 1);
this.updateDirection();
}
}
}
onMouseWheel(event: EventMouse) {
let delta = event.getScrollY() * 0.1;
//console.log(delta);
this.emitEvent(EasyControllerEvent.CAMERA_ZOOM, delta);
}
onButtonSlot(event) {
let btnName = event.target.name;
this.emitEvent(EasyControllerEvent.BUTTON, btnName);
}
private _key2dirMap = null;
updateDirection() {
if (this._key2dirMap == null) {
this._key2dirMap = {};
this._key2dirMap[0] = -1;
this._key2dirMap[KeyCode.KEY_A] = 180;
this._key2dirMap[KeyCode.KEY_D] = 0;
this._key2dirMap[KeyCode.KEY_W] = 90;
this._key2dirMap[KeyCode.KEY_S] = 270;
this._key2dirMap[KeyCode.KEY_A * 1000 + KeyCode.KEY_W] = this._key2dirMap[KeyCode.KEY_W * 1000 + KeyCode.KEY_A] = 135;
this._key2dirMap[KeyCode.KEY_D * 1000 + KeyCode.KEY_W] = this._key2dirMap[KeyCode.KEY_W * 1000 + KeyCode.KEY_D] = 45;
this._key2dirMap[KeyCode.KEY_A * 1000 + KeyCode.KEY_S] = this._key2dirMap[KeyCode.KEY_S * 1000 + KeyCode.KEY_A] = 225;
this._key2dirMap[KeyCode.KEY_D * 1000 + KeyCode.KEY_S] = this._key2dirMap[KeyCode.KEY_S * 1000 + KeyCode.KEY_D] = 315;
this._key2dirMap[KeyCode.KEY_A * 1000 + KeyCode.KEY_D] = this._key2dirMap[KeyCode.KEY_D];
this._key2dirMap[KeyCode.KEY_D * 1000 + KeyCode.KEY_A] = this._key2dirMap[KeyCode.KEY_A];
this._key2dirMap[KeyCode.KEY_W * 1000 + KeyCode.KEY_S] = this._key2dirMap[KeyCode.KEY_S];
this._key2dirMap[KeyCode.KEY_S * 1000 + KeyCode.KEY_W] = this._key2dirMap[KeyCode.KEY_W];
}
let keyCode0 = this._keys[this._keys.length - 1] || 0;
let keyCode1 = this._keys[this._keys.length - 2] || 0;
this._degree = this._key2dirMap[keyCode1 * 1000 + keyCode0];
if (this._degree == null || this._degree < 0) {
this.emitEvent(EasyControllerEvent.MOVEMENT_STOP);
}
else {
this.emitEvent(EasyControllerEvent.MOVEMENT, this._degree, 1.0);
}
}
private emitEvent(type: string, arg0?: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any) {
if (isValid(this._scene)) {
this._scene.emit(type, arg0, arg1, arg2, arg3, arg4);
}
else {
console.log('oops!');
}
}
}
\ No newline at end of file
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "0d3fd50c-507d-45ab-81b5-dc85a3ecb7f6",
"files": [],
"subMetas": {},
"userData": {}
}
[
{
"__type__": "cc.Prefab",
"_name": "ui_joystick_panel",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "ui_joystick_panel",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 10
},
{
"__id__": 20
},
{
"__id__": 66
}
],
"_active": true,
"_components": [
{
"__id__": 155
},
{
"__id__": 157
},
{
"__id__": 159
}
],
"_prefab": {
"__id__": 161
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "checker_camera",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_prefab": {
"__id__": 9
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0fZyqsL71Jo5X5Qe6tNsnC"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": false,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 57
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d0AoChjSREeLgHKkf59Vzb"
},
{
"__type__": "cc.Widget",
"_name": "Button<Widget>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 640,
"_originalHeight": 320,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "25m5M04TNAl4BNHIjAMrrL"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "0cMqkAXtpP1Jpj0Hz+MYxg",
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "checker_movement",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
},
{
"__id__": 15
},
{
"__id__": 17
}
],
"_prefab": {
"__id__": 19
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -320,
"y": -180,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 360
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c3kE+xlWdKP42qlgQXWPi7"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": false,
"__prefab": {
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 145,
"g": 32,
"b": 32,
"a": 129
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b9MreVDjBOKJh1aR0UFV4C"
},
{
"__type__": "cc.Widget",
"_name": "Button<Widget>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0.5,
"_top": 0.5,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": false,
"_isAbsTop": false,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 640,
"_originalHeight": 320,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "5fpMWtX9VDEIN1lSKC3+iO"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"clickEvents": [],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 214,
"g": 214,
"b": 214,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": {
"__id__": 10
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "47ImTsej1IxZzl08BeNJ5N"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "55mHcC2xxEDI4zcUpi9jjH",
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "ctrl",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 21
},
{
"__id__": 49
}
],
"_active": true,
"_components": [
{
"__id__": 63
}
],
"_prefab": {
"__id__": 65
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -437.524,
"y": -168.153,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 20
},
"_children": [
{
"__id__": 22
},
{
"__id__": 28
}
],
"_active": true,
"_components": [
{
"__id__": 42
},
{
"__id__": 44
},
{
"__id__": 46
}
],
"_prefab": {
"__id__": 48
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 21
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 25
}
],
"_prefab": {
"__id__": 27
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 24
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "330hXv5fNDIoJcPkluEZRC"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 26
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 180
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d5DBbkpuJDHqUEboCZJBpq"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "155mXp7QxLQ6rSQqjKBV9N",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 21
},
"_children": [
{
"__id__": 29
}
],
"_active": true,
"_components": [
{
"__id__": 35
},
{
"__id__": 37
},
{
"__id__": 39
}
],
"_prefab": {
"__id__": 41
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 30
},
{
"__id__": 32
}
],
"_prefab": {
"__id__": 34
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 31
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b4b+vIgdhE5INrZcdqsLWg"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 33
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 180
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4dvg+TolRBTIJkmXXsk7e6"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "23M5L4yeRI8Y6hzkpL+FCe",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 28
},
"_enabled": true,
"__prefab": {
"__id__": 36
},
"_contentSize": {
"__type__": "cc.Size",
"width": 185,
"height": 185
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "216/LDx2tPzphG3fjCxye+"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 28
},
"_enabled": true,
"__prefab": {
"__id__": 38
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1aKo5aGehJboNl4hOWEBMo"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 28
},
"_enabled": true,
"__prefab": {
"__id__": 40
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "14rk9pHEtDz5in/yBpDyLl"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "78UVt6ZrtLhZax+chb7E/p",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 21
},
"_enabled": true,
"__prefab": {
"__id__": 43
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "cfTiBJ1LRKnqIgyLxpKExR"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 21
},
"_enabled": true,
"__prefab": {
"__id__": 45
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "28qJfL/xRO9Z5lmtrZW9/j"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 21
},
"_enabled": true,
"__prefab": {
"__id__": 47
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4cHz4mgF1BGbLN0QWBG3NI"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "93JDZm285OVoyAXp6qXmwW",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "pointer",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 20
},
"_children": [
{
"__id__": 50
}
],
"_active": true,
"_components": [
{
"__id__": 56
},
{
"__id__": 58
},
{
"__id__": 60
}
],
"_prefab": {
"__id__": 62
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 49
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 51
},
{
"__id__": 53
}
],
"_prefab": {
"__id__": 55
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 50
},
"_enabled": true,
"__prefab": {
"__id__": 52
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9a9lIrJfFHVKHDZT62NZ6m"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 50
},
"_enabled": true,
"__prefab": {
"__id__": 54
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 170,
"g": 27,
"b": 27,
"a": 255
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "dcI06aayBASJNr/hRJ89aG"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "9b13ak09dAe7xrTgLNVUL2",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 49
},
"_enabled": true,
"__prefab": {
"__id__": 57
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "adequmQjREpoUJ0dk84JA0"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 49
},
"_enabled": true,
"__prefab": {
"__id__": 59
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "44tESj1WZMP7z80rcz6r7C"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 49
},
"_enabled": true,
"__prefab": {
"__id__": 61
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0bOzHhVY5PFJCCaKNllzV3"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b7w1ruaU5L7b+1uFnOQIQx",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 20
},
"_enabled": true,
"__prefab": {
"__id__": 64
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f6kGxWOihLP63f3kZc7xbA"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a4DfMArKhELaPwA+TvA+0Z",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "buttons",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 67
},
{
"__id__": 84
},
{
"__id__": 101
},
{
"__id__": 118
},
{
"__id__": 135
}
],
"_active": true,
"_components": [
{
"__id__": 152
}
],
"_prefab": {
"__id__": 154
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 526,
"y": -262,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_slot_0",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 66
},
"_children": [
{
"__id__": 68
}
],
"_active": true,
"_components": [
{
"__id__": 74
},
{
"__id__": 76
},
{
"__id__": 78
},
{
"__id__": 80
}
],
"_prefab": {
"__id__": 83
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 67
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 69
},
{
"__id__": 71
}
],
"_prefab": {
"__id__": 73
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 68
},
"_enabled": true,
"__prefab": {
"__id__": 70
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2atdsdGPNM0aT5MY1V1ktA"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 68
},
"_enabled": true,
"__prefab": {
"__id__": 72
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 180
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fcNqjl+SRIQ7MHHxRtNJOf"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bau+2rH21Aj7r8DqrX4r1z",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 67
},
"_enabled": true,
"__prefab": {
"__id__": 75
},
"_contentSize": {
"__type__": "cc.Size",
"width": 145,
"height": 145
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2dHICoBZVFY4KL6BwgHAvi"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 67
},
"_enabled": true,
"__prefab": {
"__id__": 77
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ca9ZVXsJxMDa1C1Njx7HT0"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 67
},
"_enabled": true,
"__prefab": {
"__id__": 79
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c5BzPzgh9FTbIickzeHfr/"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 67
},
"_enabled": true,
"__prefab": {
"__id__": 81
},
"clickEvents": [
{
"__id__": 82
}
],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "bcV5VHVx5KcLLbzdAvy9Ee"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0d3fdUMUH1Fq4G13IWj7Lf2",
"handler": "onButtonSlot",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "ccEKdclRtN441KT5DHcVNl",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "btn_slot_1",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 66
},
"_children": [
{
"__id__": 85
}
],
"_active": true,
"_components": [
{
"__id__": 91
},
{
"__id__": 93
},
{
"__id__": 95
},
{
"__id__": 97
}
],
"_prefab": {
"__id__": 100
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 20,
"y": 162,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 84
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 86
},
{
"__id__": 88
}
],
"_prefab": {
"__id__": 90
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 85
},
"_enabled": true,
"__prefab": {
"__id__": 87
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "88m1h1wVdOGZxYW6F9gUEC"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 85
},
"_enabled": true,
"__prefab": {
"__id__": 89
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 180
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a9qSA6I1FCj4Rf4HSmK31b"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "66xil0plpLdrmEVEjs++Q7",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 84
},
"_enabled": true,
"__prefab": {
"__id__": 92
},
"_contentSize": {
"__type__": "cc.Size",
"width": 75,
"height": 75
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9fmUoMBctKi63OqPdrnnRq"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 84
},
"_enabled": true,
"__prefab": {
"__id__": 94
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a2QeFppMBBFKRrc8TMYIGz"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 84
},
"_enabled": true,
"__prefab": {
"__id__": 96
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c3RVl6G6VJt5b3KtGyDbY8"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 84
},
"_enabled": true,
"__prefab": {
"__id__": 98
},
"clickEvents": [
{
"__id__": 99
}
],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fby9NaiydCR6KX9V/vbpVm"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0d3fdUMUH1Fq4G13IWj7Lf2",
"handler": "onButtonSlot",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c8n4U+w/NMw43H85mvryWv",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "btn_slot_2",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 66
},
"_children": [
{
"__id__": 102
}
],
"_active": true,
"_components": [
{
"__id__": 108
},
{
"__id__": 110
},
{
"__id__": 112
},
{
"__id__": 114
}
],
"_prefab": {
"__id__": 117
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -80.68,
"y": 133.072,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 101
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
},
{
"__id__": 105
}
],
"_prefab": {
"__id__": 107
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 102
},
"_enabled": true,
"__prefab": {
"__id__": 104
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d4deUhUkVHUboSSiFy0F3X"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 102
},
"_enabled": true,
"__prefab": {
"__id__": 106
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 180
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "08/qgDefdHRKrJ0E0sWvF/"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b4b1kl8RlD06C4VNz6Iygb",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 101
},
"_enabled": true,
"__prefab": {
"__id__": 109
},
"_contentSize": {
"__type__": "cc.Size",
"width": 75,
"height": 75
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "95ZkIYBsBFgLsUygJt+7Oh"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 101
},
"_enabled": true,
"__prefab": {
"__id__": 111
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "bcwQBb41dHp4HsbQa2IIQ1"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 101
},
"_enabled": true,
"__prefab": {
"__id__": 113
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "50NhAT9FdFCrcVMxFj3SIL"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 101
},
"_enabled": true,
"__prefab": {
"__id__": 115
},
"clickEvents": [
{
"__id__": 116
}
],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "bdnOQ+Yk9GTLboQd2DgLJv"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0d3fdUMUH1Fq4G13IWj7Lf2",
"handler": "onButtonSlot",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "98/3PSxQREu4vt8e5EQGPC",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "btn_slot_3",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 66
},
"_children": [
{
"__id__": 119
}
],
"_active": true,
"_components": [
{
"__id__": 125
},
{
"__id__": 127
},
{
"__id__": 129
},
{
"__id__": 131
}
],
"_prefab": {
"__id__": 134
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -142,
"y": 52,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 118
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 120
},
{
"__id__": 122
}
],
"_prefab": {
"__id__": 124
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 119
},
"_enabled": true,
"__prefab": {
"__id__": 121
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8fxaiTLEFG2JVkZk+9LKCx"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 119
},
"_enabled": true,
"__prefab": {
"__id__": 123
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 180
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "47HcrQAdJHd4IgGp80xNqy"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "97yW+4f/NM1JNUW/Tonl/O",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 118
},
"_enabled": true,
"__prefab": {
"__id__": 126
},
"_contentSize": {
"__type__": "cc.Size",
"width": 75,
"height": 75
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "48eZ3Vm7dKAo0aPHRcrxKO"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 118
},
"_enabled": true,
"__prefab": {
"__id__": 128
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "772K/kx1tHoq0kMZ1BCIVA"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 118
},
"_enabled": true,
"__prefab": {
"__id__": 130
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3fooQ4VwhBDodiM4ri6Fne"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 118
},
"_enabled": true,
"__prefab": {
"__id__": 132
},
"clickEvents": [
{
"__id__": 133
}
],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4d+OJjWFNIIZESl24KgXyQ"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0d3fdUMUH1Fq4G13IWj7Lf2",
"handler": "onButtonSlot",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "3cVpy0IIlLDYkv7r48ymH2",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "btn_slot_4",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 66
},
"_children": [
{
"__id__": 136
}
],
"_active": true,
"_components": [
{
"__id__": 142
},
{
"__id__": 144
},
{
"__id__": 146
},
{
"__id__": 148
}
],
"_prefab": {
"__id__": 151
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -154,
"y": -46,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_gen",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 135
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 137
},
{
"__id__": 139
}
],
"_prefab": {
"__id__": 141
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 136
},
"_enabled": true,
"__prefab": {
"__id__": 138
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ff6S/rKI5FDZvdxzJm/F7g"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 136
},
"_enabled": true,
"__prefab": {
"__id__": 140
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 180
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "891wYbHoRAs4dvZxBmafGl"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "722yKBoOFNJZVp2+6pOlu4",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 135
},
"_enabled": true,
"__prefab": {
"__id__": 143
},
"_contentSize": {
"__type__": "cc.Size",
"width": 75,
"height": 75
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "085x7WealEvI1F0fR4p4va"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 135
},
"_enabled": true,
"__prefab": {
"__id__": 145
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "dbkZp8qcFPyIzu05/1dZNS"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 135
},
"_enabled": true,
"__prefab": {
"__id__": 147
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "df6qBz7SREoqTkniEKY+nh"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 135
},
"_enabled": true,
"__prefab": {
"__id__": 149
},
"clickEvents": [
{
"__id__": 150
}
],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "694a0S7zBDvZQlgOPhm5Jn"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "0d3fdUMUH1Fq4G13IWj7Lf2",
"handler": "onButtonSlot",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "efAUyEQUFMnI3ErfBo/lvM",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 66
},
"_enabled": true,
"__prefab": {
"__id__": 153
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9aY0foPx9Ml5YHJPUweARm"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "30T2Nxx6BCL5T3LtY8Iets",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 156
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0f76PkyR9CI6GSE13j2hvT"
},
{
"__type__": "cc.Widget",
"_name": "HUD<Widget>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 158
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "61G89wei9G5ZMYyMlGMFfu"
},
{
"__type__": "0d3fdUMUH1Fq4G13IWj7Lf2",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 160
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "easj9qwJ5K1ZLYsbWsVi7m"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "4eEaTnahNPd5NO5OdceSOx",
"instance": null,
"targetOverrides": null
}
]
\ No newline at end of file
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "55ac4e22-a145-4a46-92f1-a45afa1b8f08",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "ui_joystick_panel"
}
}
//base
export { AudioMgr as tgxAudioMgr } from "./base/AudioMgr";
export { InputMgr as tgxInputMgr } from "./base/InputMgr";
export { ResourceMgr as tgxResourceMgr } from "./base/ResourceMgr";
export { SafeJSON as tgxSafeJSON } from "./base/SafeJSON";
export { ResolutionAutoFit as tgxResolutionAutoFit } from "./base/ResolutionAutoFit";
export { ModuleContext as tgxModuleContext } from "./base/ModuleContext";
export { SceneUtil as tgxSceneUtil } from "./base/SceneUtils";
import {ISceneInfo} from "./base/SceneUtils";
export type tgxISceneInfo = ISceneInfo;
//camera
export { FPSCamera as tgxFPSCamera } from "./easy_camera/FPSCamera";
export { FollowCamera2D as tgxFollowCamera2D } from "./easy_camera/FollowCamera2D";
export { FreeCamera as tgxFreeCamera } from "./easy_camera/FreeCamera";
export { ThirdPersonCamera as tgxThirdPersonCamera } from "./easy_camera/ThirdPersonCamera";
//easy controller
export { CharacterMovement as tgxCharacterMovement } from "./easy_controller/CharacterMovement";
export { CharacterMovement2D as tgxCharacterMovement2D } from "./easy_controller/CharacterMovement2D";
export { EasyController as tgxEasyController, EasyControllerEvent as tgxEasyControllerEvent } from "./easy_controller/EasyController";
export { ThirdPersonCameraCtrl as tgxThirdPersonCameraCtrl } from "./easy_controller/ThirdPersonCameraCtrl";
export { UI_Joystick as tgxUI_Joystick } from "./easy_controller/UI_Joystick";
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "f6aff908-69b8-4d9e-a779-291ba1915cf2",
"files": [],
"subMetas": {},
"userData": {}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment