'init'
|
@ -0,0 +1,2 @@
|
|||
[InternetShortcut]
|
||||
URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template
|
|
@ -0,0 +1,97 @@
|
|||
|
||||
#///////////////////////////
|
||||
# Cocos Creator 3D Project
|
||||
#///////////////////////////
|
||||
library/
|
||||
temp/
|
||||
local/
|
||||
build/
|
||||
profiles/
|
||||
native_data/
|
||||
remote-assets/*
|
||||
cocos2d-x/*
|
||||
|
||||
native/engine/*
|
||||
!native/engine/ios
|
||||
!native/engine/common
|
||||
!native/engine/android
|
||||
|
||||
native/engine/android/app/assets
|
||||
native/engine/android/app/build
|
||||
native/engine/android/app/release
|
||||
native/engine/android/app/debug
|
||||
|
||||
native/engine/android/instantapp/build
|
||||
native/engine/android/instantapp/debug
|
||||
native/engine/android/instantapp/release
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# Logs and databases
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# files for debugger
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
*.sln
|
||||
*.csproj
|
||||
*.pidb
|
||||
*.unityproj
|
||||
*.suo
|
||||
|
||||
#//////////////////////////
|
||||
# NPM
|
||||
#//////////////////////////
|
||||
node_modules/
|
||||
|
||||
#//////////////////////////
|
||||
# VSCode
|
||||
#//////////////////////////
|
||||
.vscode/
|
||||
node_modules/**
|
||||
mockServer/node_modules/**
|
||||
mockServer/package-lock.json
|
||||
package-lock.json
|
||||
assets/mock/
|
||||
assets/mock.meta
|
||||
node_modules
|
||||
|
||||
#//////////////////////////
|
||||
# WebStorm
|
||||
#//////////////////////////
|
||||
.idea/
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# OS generated files
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
*.DS_Store
|
||||
.DS_Store
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# exvim files
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
*UnityVS.meta
|
||||
*.err
|
||||
*.err.meta
|
||||
*.exvim
|
||||
*.exvim.meta
|
||||
*.vimentry
|
||||
*.vimentry.meta
|
||||
*.vimproject
|
||||
*.vimproject.meta
|
||||
.vimfiles.*/
|
||||
.exvim.*/
|
||||
quick_gen_project_*_autogen.bat
|
||||
quick_gen_project_*_autogen.bat.meta
|
||||
quick_gen_project_*_autogen.sh
|
||||
quick_gen_project_*_autogen.sh.meta
|
||||
.exvim.app
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
# super-hero
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.com/mango-pluton/super-hero.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.com/mango-pluton/super-hero/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "598b7e15-48c8-4351-a9e7-dfddcfd5e83d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "8a5893e8-f362-4b7c-97f9-88605348771d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,315 @@
|
|||
import * as cc from 'cc';
|
||||
import { Size } from 'cc';
|
||||
import { Vec3 } from 'cc';
|
||||
import { Vec2 } from 'cc';
|
||||
import { Button, Color, Label, log, math, Node, Sprite } from 'cc';
|
||||
|
||||
declare module 'cc' {
|
||||
interface Node {
|
||||
setPositionX(x: number): void;
|
||||
|
||||
setPositionY(y: number): void;
|
||||
|
||||
setPositionZ(z: number): void;
|
||||
|
||||
changePositionX(x: number): void;
|
||||
|
||||
changePositionY(y: number): void;
|
||||
|
||||
changePositionZ(z: number): void;
|
||||
|
||||
setScaleX(x: number): void;
|
||||
|
||||
setScaleY(y: number): void;
|
||||
|
||||
setScaleZ(z: number): void;
|
||||
|
||||
logColor(title: string, data: any, color: Color): void;
|
||||
|
||||
setNodeActive(isActive: boolean): void;
|
||||
|
||||
setNodeOpacity(opacity: number): void;
|
||||
|
||||
getNodeOpacity(): number;
|
||||
|
||||
getNodeTransform(): cc.UITransform;
|
||||
|
||||
onFadeTo(time: number, from: number, to: number, callback?: Function): void;
|
||||
|
||||
onFadeIn(time: number, opacity: number, callback?: Function): void;
|
||||
|
||||
onFadeOut(time: number, callback?: Function): void;
|
||||
|
||||
getContentSize(): cc.Size;
|
||||
setContentSize(size: cc.Size): void;
|
||||
|
||||
}
|
||||
|
||||
interface Sprite {
|
||||
setOpacity(a: number): void;
|
||||
|
||||
setColor(color: Color): void;
|
||||
}
|
||||
|
||||
interface Button {
|
||||
setOpacity(a: number): void;
|
||||
|
||||
setBtnActive(isActive: boolean): void;
|
||||
}
|
||||
|
||||
interface Label {
|
||||
setOpacity(a: number): void;
|
||||
|
||||
setColor(color: Color): void;
|
||||
}
|
||||
|
||||
interface Vec3 {
|
||||
toVec2(): Vec2;
|
||||
}
|
||||
|
||||
interface Vec2 {
|
||||
toVec3(): Vec3;
|
||||
}
|
||||
}
|
||||
|
||||
Button.prototype.setOpacity = function (a: number): void {
|
||||
this.node.setNodeOpacity(a);
|
||||
}
|
||||
|
||||
Button.prototype.setBtnActive = function (isActive: boolean): void {
|
||||
this.node.active = isActive;
|
||||
}
|
||||
|
||||
//NODE
|
||||
Node.prototype.setNodeActive = function (isActive: boolean): void {
|
||||
this.active = isActive;
|
||||
}
|
||||
|
||||
Node.prototype.logColor = function (title: string, data: any, color: Color): void {
|
||||
log(`%c ${title}`, `background: #222; color: #${color.toHEX()}`, data);
|
||||
}
|
||||
|
||||
Node.prototype.setPositionX = function (x: number): void {
|
||||
this.position = new math.Vec3(x, this.position.y, this.position.z);
|
||||
}
|
||||
|
||||
Node.prototype.setPositionY = function (y: number): void {
|
||||
this.position = new math.Vec3(this.position.x, y, this.position.z);
|
||||
}
|
||||
|
||||
Node.prototype.setPositionZ = function (z: number): void {
|
||||
this.position = new math.Vec3(this.position.x, this.position.y, z);
|
||||
}
|
||||
|
||||
Node.prototype.changePositionX = function (x: number): void {
|
||||
this.position = new math.Vec3(this.position.x + x, this.position.y, this.position.z);
|
||||
}
|
||||
|
||||
Node.prototype.changePositionY = function (y: number): void {
|
||||
this.position = new math.Vec3(this.position.x, this.position.y + y, this.position.z);
|
||||
}
|
||||
|
||||
Node.prototype.changePositionZ = function (z: number): void {
|
||||
this.position = new math.Vec3(this.position.x, this.position.y, this.position.z + z);
|
||||
}
|
||||
|
||||
Node.prototype.setScaleX = function (x: number): void {
|
||||
this.scale = new math.Vec3(x, this.scale.y, this.scale.z);
|
||||
}
|
||||
|
||||
Node.prototype.setScaleY = function (y: number): void {
|
||||
this.scale = new math.Vec3(this.scale.x, y, this.scale.z);
|
||||
}
|
||||
|
||||
Node.prototype.setScaleZ = function (z: number): void {
|
||||
this.scale = new math.Vec3(this.scale.x, this.scale.y, z);
|
||||
}
|
||||
|
||||
Node.prototype.setNodeOpacity = function (opacity: number): void {
|
||||
let uiOpacity = this.getComponent(cc.UIOpacity) as cc.UIOpacity;
|
||||
if (uiOpacity) {
|
||||
uiOpacity.opacity = opacity;
|
||||
}
|
||||
else {
|
||||
uiOpacity = this.addComponent(cc.UIOpacity);
|
||||
uiOpacity.opacity = opacity;
|
||||
}
|
||||
}
|
||||
|
||||
Node.prototype.getNodeOpacity = function (): number {
|
||||
let uiOpacity = this.getComponent(cc.UIOpacity) as cc.UIOpacity;
|
||||
if (uiOpacity) {
|
||||
return uiOpacity.opacity;
|
||||
}
|
||||
else {
|
||||
this.setNodeOpacity(255);
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
|
||||
Node.prototype.getNodeTransform = function (): cc.UITransform {
|
||||
return this.getComponent(cc.UITransform) as cc.UITransform;
|
||||
}
|
||||
|
||||
|
||||
Node.prototype.getContentSize = function (): cc.Size {
|
||||
return this.getNodeTransform().contentSize as cc.Size;
|
||||
}
|
||||
|
||||
Node.prototype.setContentSize = function (size: cc.Size): void {
|
||||
this.getComponent(cc.UITransform)?.setContentSize(size);
|
||||
}
|
||||
|
||||
|
||||
Node.prototype.onFadeTo = function (time: number, from: number, to: number, callback?: Function): void {
|
||||
this.setNodeOpacity(from);
|
||||
let uiOpacity = this.getComponent(cc.UIOpacity);
|
||||
cc.tween(uiOpacity).to(time, { opacity: to }).call(() => {
|
||||
callback?.();
|
||||
}).start();
|
||||
}
|
||||
|
||||
Node.prototype.onFadeIn = function (time: number, opacity: number, callback?: Function): void {
|
||||
this.onFadeTo(time, 1, opacity, callback);
|
||||
}
|
||||
|
||||
Node.prototype.onFadeOut = function (time: number, callback?: Function): void {
|
||||
let opacity = this.getNodeOpacity();
|
||||
this.onFadeTo(time, opacity, 1, callback);
|
||||
}
|
||||
|
||||
//SPRITE
|
||||
Sprite.prototype.setOpacity = function (a: number): void {
|
||||
this.node.setNodeOpacity(a);
|
||||
}
|
||||
|
||||
Sprite.prototype.setColor = function (color: Color): void {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
//LABEL
|
||||
Label.prototype.setOpacity = function (a: number): void {
|
||||
this.node.setNodeOpacity(a);
|
||||
}
|
||||
|
||||
Label.prototype.setColor = function (color: Color): void {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
declare global {
|
||||
interface Number {
|
||||
roundDigits(digits: number): number;
|
||||
trunc(): number;
|
||||
truncDigits(digits: number): number;
|
||||
toFixedDown(digits: number): number;
|
||||
}
|
||||
|
||||
interface String {
|
||||
toInt(): number;
|
||||
|
||||
toFloat(): number;
|
||||
|
||||
toBoolean(): boolean;
|
||||
|
||||
formatWithMaxLength(maxLength: number): string;
|
||||
|
||||
isNullOrUndefined(): boolean;
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
shuffleArray(): Array<T>;
|
||||
|
||||
toJson(): string;
|
||||
|
||||
clearArray(): Array<T>;
|
||||
|
||||
cloneArray(): Array<T>;
|
||||
}
|
||||
}
|
||||
|
||||
Array.prototype.shuffleArray = function () {
|
||||
for (let i = this.length - 1; i >= 0; i--) {
|
||||
const randomIndex = Math.floor(Math.random() * (i + 1));
|
||||
const itemIndex = this[randomIndex];
|
||||
this[randomIndex] = this[i];
|
||||
this[i] = itemIndex;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
Array.prototype.clearArray = function () {
|
||||
this.splice(0, this.length);
|
||||
return this;
|
||||
}
|
||||
|
||||
Array.prototype.cloneArray = function () {
|
||||
return [...this];
|
||||
}
|
||||
|
||||
Array.prototype.toJson = function (): string {
|
||||
return JSON.stringify(this);
|
||||
}
|
||||
|
||||
String.prototype.toInt = function (): number {
|
||||
if (String(this) === null || String(this) === undefined) return 0;
|
||||
let result = Number(String(this));
|
||||
if (Number.isNaN(result)) return 0;
|
||||
return Math.trunc(result);
|
||||
}
|
||||
|
||||
String.prototype.toFloat = function (): number {
|
||||
if (String(this) === null || String(this) === undefined) return 0;
|
||||
let result = Number(String(this));
|
||||
if (Number.isNaN(result)) result = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
String.prototype.toBoolean = function (): boolean {
|
||||
return String(this).toLowerCase() == 'true';
|
||||
}
|
||||
|
||||
String.prototype.formatWithMaxLength = function (maxLength: number): string {
|
||||
if (this == null || this == undefined) return "";
|
||||
let str = String(this);
|
||||
if (str.length > maxLength) {
|
||||
if (str.charAt(maxLength - 1) === " ") {
|
||||
str = `${str.substring(0, maxLength - 1)}..`;
|
||||
}
|
||||
else {
|
||||
str = `${str.substring(0, maxLength)}..`;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
String.prototype.isNullOrUndefined = function (): boolean {
|
||||
return String(this) == null || String(this) == undefined;
|
||||
}
|
||||
|
||||
Number.prototype.roundDigits = function (digits: number): number {
|
||||
return Math.round(Number(this) * Math.pow(10, digits)) / Math.pow(10, digits);
|
||||
}
|
||||
|
||||
Number.prototype.truncDigits = function (digits: number): number {
|
||||
return digits > 0 ? Number(this).toFixedDown(digits) : (Math.trunc(Number(this) * Math.pow(10, digits)) / Math.pow(10, digits));
|
||||
}
|
||||
|
||||
Number.prototype.trunc = function (): number {
|
||||
return Math.trunc(Number(this));
|
||||
}
|
||||
|
||||
Number.prototype.toFixedDown = function (digits: number): number {
|
||||
var re = new RegExp("(\\d+\\.\\d{" + digits + "})(\\d)"),
|
||||
m = Number(this).toString().match(re);
|
||||
return m ? parseFloat(m[1]) : Number(this).valueOf();
|
||||
}
|
||||
|
||||
Vec3.prototype.toVec2 = function (): Vec2{
|
||||
return new Vec2(this.x, this.y);
|
||||
}
|
||||
|
||||
Vec2.prototype.toVec3 = function (): Vec3 {
|
||||
return new Vec3(this.x, this.y, 0);
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7973cb3a-1318-4445-b663-9297df554d8c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "68bdfafd-b48a-491f-93d3-4c4e8b459d89",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,219 @@
|
|||
|
||||
// Rest API to connect to server
|
||||
|
||||
class ServiceRest {
|
||||
request: any;
|
||||
constructor() {
|
||||
this.request = new XMLHttpRequest();
|
||||
}
|
||||
encodeQueryData(data) {
|
||||
return Object.keys(data).map(function(key) {
|
||||
return [key, data[key]].map(encodeURIComponent).join("=");
|
||||
}).join("&");
|
||||
};
|
||||
|
||||
get({url = '', params = {}, callback = (data) => {}, apiUrl = '', callbackErr = () => {}}) {
|
||||
const querystring = '?' + this.encodeQueryData(params);
|
||||
const fullURL = apiUrl + url + querystring;
|
||||
const request = new XMLHttpRequest();
|
||||
request.open("GET", fullURL, true);
|
||||
request.timeout = 15000;
|
||||
request.setRequestHeader("Content-Type","application/json;charset=UTF-8");
|
||||
request.onreadystatechange = function () {
|
||||
if (request.readyState == 4) {
|
||||
//get status text
|
||||
if (callback) {
|
||||
if (request.responseText) {
|
||||
callback(JSON.parse(request.responseText));
|
||||
} else {
|
||||
callbackErr();
|
||||
}
|
||||
}
|
||||
} else if (request.readyState === 0) {
|
||||
callbackErr();
|
||||
}
|
||||
if (request.status !== 200) {
|
||||
callbackErr();
|
||||
}
|
||||
};
|
||||
request.ontimeout = function (e) {
|
||||
callbackErr();
|
||||
};
|
||||
request.onerror = (e) => {
|
||||
callbackErr();
|
||||
};
|
||||
request.send();
|
||||
};
|
||||
|
||||
getWithHeader({url = '', params = {}, headers = {}, callback = (data) => {}, apiUrl = '', callbackErr = () => {}}) {
|
||||
const querystring = '?' + this.encodeQueryData(params);
|
||||
const fullURL = apiUrl + url + querystring;
|
||||
const request = new XMLHttpRequest();
|
||||
request.open("GET", fullURL, true);
|
||||
request.timeout = 15000;
|
||||
request.setRequestHeader("Content-Type","application/json;charset=UTF-8");
|
||||
|
||||
Object.keys(headers).forEach( (key) => {
|
||||
request.setRequestHeader(key, headers[key]);
|
||||
});
|
||||
|
||||
request.onreadystatechange = function () {
|
||||
if (request.readyState == 4) {
|
||||
//get status text
|
||||
if (callback) {
|
||||
if (request.responseText) {
|
||||
callback(JSON.parse(request.responseText));
|
||||
} else {
|
||||
callbackErr();
|
||||
}
|
||||
}
|
||||
} else if (request.readyState === 0) {
|
||||
callbackErr();
|
||||
}
|
||||
if (request.status !== 200) {
|
||||
callbackErr();
|
||||
}
|
||||
};
|
||||
request.ontimeout = function () {
|
||||
callbackErr();
|
||||
};
|
||||
request.onerror = () => {
|
||||
callbackErr();
|
||||
};
|
||||
request.send();
|
||||
};
|
||||
|
||||
post({url = '', data = {}, callback = (data) => {}, apiUrl = '', callbackErr = () => {}}) {
|
||||
const dataPost = this.encodeQueryData(data);
|
||||
const fullURL = apiUrl + url;
|
||||
const request = new XMLHttpRequest();
|
||||
request.open('POST', fullURL, true);
|
||||
request.timeout = 15000;
|
||||
request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
request.onreadystatechange = function() {
|
||||
if(request.readyState == 4) {
|
||||
if (request.responseText) {
|
||||
callback({
|
||||
status: request.status,
|
||||
data: JSON.parse(request.responseText)
|
||||
});
|
||||
} else {
|
||||
callbackErr();
|
||||
}
|
||||
} else if (request.readyState === 0) {
|
||||
callbackErr();
|
||||
}
|
||||
if (request.status !== 200) {
|
||||
callbackErr();
|
||||
}
|
||||
};
|
||||
request.ontimeout = function (e) {
|
||||
callbackErr();
|
||||
};
|
||||
request.onerror = (e) => {
|
||||
callbackErr();
|
||||
};
|
||||
request.send(dataPost);
|
||||
};
|
||||
|
||||
postWithHeader ({url = '',params = {}, headers = {}, data = {}, callback = (data) => {}, apiUrl = '', callbackErr = () => {}}) {
|
||||
const dataPost = JSON.stringify(data);
|
||||
const querystring = '?' + this.encodeQueryData(params);
|
||||
const fullURL = apiUrl + url + querystring;
|
||||
const request = new XMLHttpRequest();
|
||||
request.open('POST', fullURL, true);
|
||||
request.timeout = 15000;
|
||||
request.setRequestHeader('Content-type', 'application/json');
|
||||
|
||||
Object.keys(headers).forEach( (key) => {
|
||||
request.setRequestHeader(key, headers[key]);
|
||||
});
|
||||
|
||||
request.onreadystatechange = function() {
|
||||
if(request.readyState == 4) {
|
||||
if (request.responseText) {
|
||||
callback({
|
||||
status: request.status,
|
||||
data: JSON.parse(request.responseText)
|
||||
});
|
||||
} else {
|
||||
callbackErr();
|
||||
}
|
||||
} else if (request.readyState === 0) {
|
||||
callbackErr();
|
||||
}
|
||||
if (request.status !== 200) {
|
||||
callbackErr();
|
||||
}
|
||||
};
|
||||
request.ontimeout = function (e) {
|
||||
callbackErr();
|
||||
};
|
||||
request.onerror = (e) => {
|
||||
callbackErr();
|
||||
};
|
||||
request.send(dataPost);
|
||||
};
|
||||
|
||||
postRaw({url = '', data = {}, callback = (data) => {}, apiUrl = '', callbackErr = () => {}}) {
|
||||
const dataPost = data;
|
||||
const fullURL = apiUrl + url;
|
||||
const request = new XMLHttpRequest();
|
||||
request.open('POST', fullURL, true);
|
||||
request.timeout = 15000;
|
||||
request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
request.onreadystatechange = function() {
|
||||
if(request.status == 200) {
|
||||
callback({
|
||||
status: request.status,
|
||||
data: request.responseText
|
||||
});
|
||||
} else {
|
||||
callbackErr();
|
||||
}
|
||||
};
|
||||
request.ontimeout = function (e) {
|
||||
callbackErr();
|
||||
};
|
||||
request.onerror = (e) => {
|
||||
callbackErr();
|
||||
};
|
||||
request.send(dataPost);
|
||||
};
|
||||
|
||||
put({url = '', data = {}, callback = (data) => {}, apiUrl = '', callbackErr = () => {}}) {
|
||||
const dataPost = this.encodeQueryData(data);
|
||||
const fullURL = apiUrl + url;
|
||||
const request = new XMLHttpRequest();
|
||||
request.open('PUT', fullURL, true);
|
||||
request.timeout = 15000;
|
||||
request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
request.onreadystatechange = function() {
|
||||
if(request.readyState == 4) {
|
||||
if (request.responseText) {
|
||||
callback({
|
||||
status: request.status,
|
||||
data: JSON.parse(request.responseText)
|
||||
});
|
||||
} else {
|
||||
callbackErr();
|
||||
}
|
||||
} else if (request.readyState === 0) {
|
||||
callbackErr();
|
||||
}
|
||||
if (request.status !== 200) {
|
||||
callbackErr();
|
||||
}
|
||||
};
|
||||
request.ontimeout = function (e) {
|
||||
callbackErr();
|
||||
};
|
||||
request.onerror = (e) => {
|
||||
callbackErr();
|
||||
};
|
||||
request.send(dataPost);
|
||||
};
|
||||
};
|
||||
|
||||
const apiObject = new ServiceRest();
|
||||
export default apiObject;
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "34b88a2c-4b90-41fb-9853-a9f4b18d7fee",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "0e47de47-e00e-4bca-9c0d-f48aa216de33",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
import { _decorator, CCFloat, Component, game, Game, Node, ProgressBar, tween } from 'cc';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmButtonCountdown')
|
||||
export class UmButtonCountdown extends Component {
|
||||
@property(ProgressBar) public barCountdown: ProgressBar = null!;
|
||||
@property(Node) public blockInput: Node = null!;
|
||||
@property(CCFloat) public TIME_COUNTDOWN = 10;
|
||||
private _time_available = 0;
|
||||
private _tween: any = null!;
|
||||
|
||||
onLoad() {
|
||||
game.on(Game.EVENT_SHOW, this._onShowGame, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
game.off(Game.EVENT_SHOW, this._onShowGame, this);
|
||||
}
|
||||
|
||||
private _onShowGame() {
|
||||
this._checkCountdown();
|
||||
}
|
||||
|
||||
onEnable() {
|
||||
this._checkCountdown();
|
||||
}
|
||||
|
||||
private _checkCountdown() {
|
||||
this._tween?.stop();
|
||||
this._tween = null;
|
||||
|
||||
let now_time = (new Date()).getTime();
|
||||
if (now_time >= this._time_available) {
|
||||
this.barCountdown.progress = 0;
|
||||
this.blockInput?.setNodeActive(false);
|
||||
return;
|
||||
}
|
||||
this._startCountdown(now_time);
|
||||
}
|
||||
|
||||
private _startCountdown(now_time: number) {
|
||||
this.blockInput?.setNodeActive(true);
|
||||
let action_time = this._time_available - now_time;
|
||||
action_time = action_time / 1000;
|
||||
this.barCountdown.progress = action_time / this.TIME_COUNTDOWN;
|
||||
this.tweenBar(action_time);
|
||||
}
|
||||
|
||||
onDisable() {
|
||||
this._tween?.stop();
|
||||
this._tween = null;
|
||||
}
|
||||
|
||||
public updateTimeAvailAble() {
|
||||
let now_time = (new Date()).getTime();
|
||||
this._time_available = now_time + this.TIME_COUNTDOWN * 1000;
|
||||
this._startCountdown(now_time);
|
||||
}
|
||||
|
||||
|
||||
public tweenBar(actionTime: number) {
|
||||
this._tween = tween(this.barCountdown).to(actionTime, { progress: 0 }).call(() => {
|
||||
this._tween = null;
|
||||
if (this.node) {
|
||||
this.barCountdown.progress = 0;
|
||||
this.blockInput?.setNodeActive(false);
|
||||
}
|
||||
});
|
||||
|
||||
this._tween.start();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "d20cf127-1092-4170-a80d-10bcf1de194a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
import { _decorator, Button, CCFloat, Color, Label, Sprite, Vec3 } from 'cc';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmButtonCustom')
|
||||
export class UmButtonCustom extends Button {
|
||||
@property(Label) public lbTitle: Label = null!;
|
||||
@property(Sprite) public spIcon: Sprite = null!;
|
||||
|
||||
@property(CCFloat) pressedScale: Number = 0.95;
|
||||
|
||||
@property(CCFloat) textPosYChange: Number = 0;
|
||||
@property(CCFloat) iconPosYChange: Number = 0;
|
||||
|
||||
@property(Color) public textColorNormal: Color = new Color(255, 255, 255, 255);
|
||||
@property(Color) public textColorPressed: Color = new Color(255, 255, 255, 180);
|
||||
|
||||
private _state: string = "none";
|
||||
private _textPosY = -1001;
|
||||
private _iconPosY = -1001;
|
||||
|
||||
start() {
|
||||
|
||||
// if (this.lbTitle) {
|
||||
// this._textOriginY = this.lbTitle.node.position.y;
|
||||
// HTLog.error("BUTTON CUSTOM ===>>> ", this.lbTitle.string, this._textOriginY);
|
||||
// }
|
||||
|
||||
// if (this.spIcon) {
|
||||
// this._iconOriginY = this.spIcon.node.position.y;
|
||||
// }
|
||||
}
|
||||
|
||||
private _updateUINormal() {
|
||||
if (this.lbTitle) {
|
||||
this.lbTitle.setColor(this.textColorNormal);
|
||||
this.lbTitle.node.setScale(Vec3.ONE);
|
||||
|
||||
if (this._textPosY < -1000) {
|
||||
this._textPosY = this.lbTitle.node.position.y;
|
||||
}
|
||||
else {
|
||||
this.lbTitle.node.setPositionY(this._textPosY);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.spIcon) {
|
||||
this.spIcon.setColor(this.textColorNormal);
|
||||
this.spIcon.node.setScale(Vec3.ONE);
|
||||
|
||||
if (this._iconPosY < -1000) {
|
||||
this._iconPosY = this.spIcon.node.position.y;
|
||||
}
|
||||
else {
|
||||
this.spIcon.node.setPositionY(this._iconPosY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private _updateUIPressed() {
|
||||
if (this.lbTitle) {
|
||||
this.lbTitle.setColor(this.textColorPressed);
|
||||
this.lbTitle.node.setScale(new Vec3(Number(this.pressedScale), Number(this.pressedScale), 1));
|
||||
// this.lbTitle.node.setPositionY(this.lbTitle.node.position.y - Number(this.textPosY));
|
||||
|
||||
if (this._textPosY < -1000) {
|
||||
this._textPosY = this.lbTitle.node.position.y;
|
||||
}
|
||||
this.lbTitle.node.setPositionY(this._textPosY + Number(this.textPosYChange));
|
||||
}
|
||||
|
||||
if (this.spIcon) {
|
||||
this.spIcon.setColor(this.textColorPressed);
|
||||
this.spIcon.node.setScale(new Vec3(Number(this.pressedScale), Number(this.pressedScale), 1));
|
||||
|
||||
if (this._iconPosY < -1000) {
|
||||
this._iconPosY = this.spIcon.node.position.y;
|
||||
}
|
||||
this.spIcon.node.setPositionY(this._iconPosY + Number(this.iconPosYChange));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected _applyTransition(state: string) {
|
||||
super._applyTransition(state);
|
||||
if (this._state !== state) {
|
||||
// HTLog.log("==>ButtonCustom: _updateSpriteTransition = ", state);
|
||||
if (state === "normal" || state === "hover" || state === "disabled") {
|
||||
this._updateUINormal();
|
||||
}
|
||||
|
||||
if (state === "pressed") {
|
||||
this._updateUIPressed();
|
||||
}
|
||||
this._state = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "671ebd34-be6b-4831-a12d-b24acdb15057",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import { _decorator, CCFloat, Component, tween } from 'cc';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmDestroyItem')
|
||||
export class UmDestroyItem extends Component {
|
||||
@property(CCFloat) public delayTime = 1;
|
||||
|
||||
onLoad() {
|
||||
tween(this.node).delay(this.delayTime).removeSelf().call(() => {
|
||||
this.node.destroy();
|
||||
}).start();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "64898fb7-c914-4d93-ab8d-d888fe58f811",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,241 @@
|
|||
import { _decorator, Button, CCBoolean, Component, Sprite, tween, Vec3, view, Widget } from 'cc';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmPopupBase')
|
||||
export class UmPopupBase extends Component {
|
||||
@property(Button) public bgBlack: Button = null!;
|
||||
@property(Sprite) public bgPopup: Sprite = null!;
|
||||
@property(CCBoolean) public isAnimShowHide = true;
|
||||
|
||||
_transitions_type: string = "Z";
|
||||
_is_black_panel: boolean = true;
|
||||
public popup_pos = Vec3.ZERO;
|
||||
|
||||
private OPACITY_BLACK = 150;
|
||||
|
||||
DURATION_SHOW_ZOOM = 0.35;
|
||||
DURATION_HIDE_ZOOM = 0.35;
|
||||
SCALE_START_SHOW_ZOOM = 0.8;
|
||||
SCALE_END_HIDE_ZOOM = 0.8;
|
||||
|
||||
DURATION_SHOW_MOVE = 0.35;
|
||||
DURATION_HIDE_MOVE = 0.35;
|
||||
|
||||
public static TRANSITIONS_TYPE = {
|
||||
ZOOM_IN: "Z",
|
||||
MOVE_IN_TOP: "T",
|
||||
MOVE_IN_BOTTOM: "B",
|
||||
MOVE_IN_RIGHT: "R",
|
||||
MOVE_IN_LEFT: "L",
|
||||
}
|
||||
|
||||
public static MOVE_TYPE = {
|
||||
BOTTOM: 0,
|
||||
TOP: 1,
|
||||
LEFT: 2,
|
||||
RIGHT: 3,
|
||||
ORIGIN: 4
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
if (this.bgBlack) {
|
||||
this.bgBlack.node.on(Button.EventType.CLICK, this.onBtnCloseClicked, this);
|
||||
}
|
||||
}
|
||||
|
||||
public show(callback: Function = null!) {
|
||||
if (this.isAnimShowHide) {
|
||||
this._fadeInBlackPanel();
|
||||
if (this.bgPopup) {
|
||||
this.popup_pos = new Vec3(this.bgPopup.node.position);
|
||||
this.bgPopup.node.setScale(new Vec3(this.SCALE_START_SHOW_ZOOM, this.SCALE_START_SHOW_ZOOM, 1));
|
||||
tween(this.bgPopup.node).to(this.DURATION_SHOW_ZOOM, { scale: Vec3.ONE }, { easing: 'backOut' }).call(() => {
|
||||
if (this.bgBlack) {
|
||||
this.bgBlack.interactable = true;
|
||||
}
|
||||
callback?.();
|
||||
}).start();
|
||||
this.bgPopup.node.onFadeIn(this.DURATION_SHOW_ZOOM, 255);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.bgBlack?.setOpacity(this.OPACITY_BLACK);
|
||||
if (this.bgBlack) {
|
||||
this.bgBlack.interactable = true;
|
||||
}
|
||||
callback?.();
|
||||
}
|
||||
}
|
||||
|
||||
public hide(callback: Function = null!) {
|
||||
if (this.isAnimShowHide) {
|
||||
this._fadeOutBlackPanel();
|
||||
if (this.bgPopup) {
|
||||
let duration = this.DURATION_HIDE_ZOOM;
|
||||
tween(this.bgPopup.node).to(duration, { scale: new Vec3(this.SCALE_END_HIDE_ZOOM, this.SCALE_END_HIDE_ZOOM, 1) }, { easing: 'backIn' }).call(() => {
|
||||
callback?.();
|
||||
this.node.destroyAllChildren();
|
||||
this.node.destroy();
|
||||
}).start();
|
||||
|
||||
tween(this.bgPopup.node).delay(0.1).call(() => this.bgPopup.node.onFadeOut(duration)).start();
|
||||
}
|
||||
else {
|
||||
callback?.();
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
else {
|
||||
callback?.();
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
private _fadeInBlackPanel() {
|
||||
if (this.bgBlack) {
|
||||
this.bgBlack.node.onFadeIn(this.DURATION_SHOW_MOVE, this.OPACITY_BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
private _fadeOutBlackPanel() {
|
||||
if (this.bgBlack) {
|
||||
this.bgBlack.node.onFadeOut(this.DURATION_HIDE_MOVE);
|
||||
}
|
||||
}
|
||||
|
||||
public showWithTransitions(type: string, isBlackPanel: boolean = true, callback: Function = null!) {
|
||||
this._transitions_type = type;
|
||||
this._is_black_panel = isBlackPanel;
|
||||
if (type === UmPopupBase.TRANSITIONS_TYPE.ZOOM_IN) {
|
||||
this.show();
|
||||
}
|
||||
else {
|
||||
this.bgPopup.getComponent(Widget)?.updateAlignment();
|
||||
let pos = new Vec3(this.bgPopup.node.position);
|
||||
this.popup_pos = pos;
|
||||
let new_pos = new Vec3();
|
||||
|
||||
switch (type) {
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_TOP:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().y;
|
||||
new_pos = new Vec3(pos.x, pos.y + value, pos.z);
|
||||
}
|
||||
break;
|
||||
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_BOTTOM:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().y;
|
||||
new_pos = new Vec3(pos.x, pos.y - value, pos.z);
|
||||
}
|
||||
break;
|
||||
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_RIGHT:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().x;
|
||||
new_pos = new Vec3(pos.x + value, pos.y, pos.z);
|
||||
}
|
||||
break;
|
||||
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_LEFT:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().x;
|
||||
new_pos = new Vec3(pos.x - value, pos.y, pos.z);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
this.bgPopup.node.position = new_pos;
|
||||
let duration = this.DURATION_SHOW_MOVE;
|
||||
tween(this.bgPopup.node).to(duration, { position: pos }, { easing: 'sineOut' }).call(() => {
|
||||
if (this.bgBlack) {
|
||||
this.bgBlack.interactable = true;
|
||||
}
|
||||
callback?.();
|
||||
}).start();
|
||||
|
||||
if (isBlackPanel) {
|
||||
this._fadeInBlackPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public hideWithTransitions(callback: Function = null!) {
|
||||
if (this._transitions_type === UmPopupBase.TRANSITIONS_TYPE.ZOOM_IN) {
|
||||
this.hide(callback);
|
||||
}
|
||||
else {
|
||||
let pos = new Vec3(this.bgPopup.node.position);
|
||||
let new_pos = new Vec3();
|
||||
|
||||
switch (this._transitions_type) {
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_TOP:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().y;
|
||||
new_pos = new Vec3(pos.x, pos.y + value, pos.z);
|
||||
}
|
||||
break;
|
||||
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_BOTTOM:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().y;
|
||||
new_pos = new Vec3(pos.x, pos.y - value, pos.z);
|
||||
}
|
||||
break;
|
||||
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_RIGHT:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().x;
|
||||
new_pos = new Vec3(pos.x + value, pos.y, pos.z);
|
||||
}
|
||||
break;
|
||||
|
||||
case UmPopupBase.TRANSITIONS_TYPE.MOVE_IN_LEFT:
|
||||
{
|
||||
let value = view.getDesignResolutionSize().x;
|
||||
new_pos = new Vec3(pos.x - value, pos.y, pos.z);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (this._is_black_panel) {
|
||||
this._fadeOutBlackPanel();
|
||||
}
|
||||
|
||||
let duration = this.DURATION_HIDE_MOVE;
|
||||
tween(this.bgPopup.node).to(duration, { position: new_pos }, { easing: 'sineIn' }).call(() => {
|
||||
if (this.bgBlack) {
|
||||
this.bgBlack.node.active = false;
|
||||
}
|
||||
callback?.();
|
||||
this.node.destroyAllChildren();
|
||||
this.node.destroy();
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
public setTransitionsType(transitions_type: string) {
|
||||
this._transitions_type = transitions_type;
|
||||
}
|
||||
|
||||
|
||||
onBtnCloseClicked(button: Button) {
|
||||
if (button) {
|
||||
button.interactable = false;
|
||||
}
|
||||
this.hideWithTransitions();
|
||||
}
|
||||
|
||||
closePopupWithCallBack(btn: Button, callback: Function) {
|
||||
if (btn) {
|
||||
btn.interactable = false;
|
||||
}
|
||||
this.hideWithTransitions(callback);
|
||||
}
|
||||
|
||||
public onClosePopupWithAnim(isAnim: boolean = true) {
|
||||
this.isAnimShowHide = isAnim;
|
||||
this.hide();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7113402c-4fa5-438b-8b98-6ab75db05805",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
import { _decorator, Component, Node } from 'cc';
|
||||
import { UmDeviceInfo } from '../cc-util/UmDeviceInfo';
|
||||
import { SafeArea } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmSafeArena')
|
||||
export class UmSafeArena extends Component {
|
||||
start() {
|
||||
if (!UmDeviceInfo.isNative)
|
||||
return;
|
||||
|
||||
let safeArena = this.node?.getComponent(SafeArea);
|
||||
if (!safeArena)
|
||||
return;
|
||||
|
||||
safeArena.enabled = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "a20a2692-fa76-4dd1-b7df-af5e8eefb11d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import { _decorator, Color, EventTouch, Slider, Sprite } from 'cc';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmSliderCustom')
|
||||
export class UmSliderCustom extends Slider {
|
||||
public onTouchEnded: ((event?: EventTouch) => void) | undefined;
|
||||
public onTouchCancelled: ((event?: EventTouch) => void) | undefined;
|
||||
|
||||
@property(Sprite) public bg: Sprite = null!;
|
||||
|
||||
_onTouchEnded(event?: EventTouch) {
|
||||
super._onTouchEnded(event);
|
||||
this.onTouchEnded?.(event);
|
||||
}
|
||||
|
||||
protected _onTouchCancelled(event?: EventTouch) {
|
||||
super._onTouchCancelled(event);
|
||||
this.onTouchCancelled?.(event);
|
||||
}
|
||||
|
||||
public setOpacity(opacity: number) {
|
||||
this.handle?.setOpacity(opacity);
|
||||
this.bg?.setOpacity(opacity);
|
||||
}
|
||||
|
||||
public setColor(color: Color) {
|
||||
this.bg?.setColor(color);
|
||||
this.handle?.getComponent(Sprite)?.setColor(color);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "56e819f4-f5b2-485d-802d-9fa9a53930e2",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
import { _decorator, Button, CCFloat, Color, Label, Node, Sprite, SpriteFrame, tween, Vec3 } from 'cc';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmSwitchButton')
|
||||
export class UmSwitchButton extends Button {
|
||||
@property(CCFloat) public animTime = 0.1;
|
||||
@property(Sprite) public dot: Sprite = null!;
|
||||
@property(Label) public title: Label = null!;
|
||||
|
||||
@property(SpriteFrame) public spf_off: SpriteFrame = null!;
|
||||
@property(SpriteFrame) public spf_on: SpriteFrame = null!;
|
||||
|
||||
@property(SpriteFrame) public spf_dot_off: SpriteFrame = null!;
|
||||
@property(SpriteFrame) public spf_dot_on: SpriteFrame = null!;
|
||||
|
||||
@property(Node) public listTargetPos: Node[] = [];
|
||||
|
||||
public status: boolean = true;
|
||||
|
||||
public onSwitched: ((status: boolean) => void) | undefined;
|
||||
|
||||
setInitStatus(status: boolean) {
|
||||
this.status = status;
|
||||
this.dot.node.position = this.getDotTarget(this.status);
|
||||
this.setSpriteFrame(status);
|
||||
}
|
||||
|
||||
onClicked(btn: Button) {
|
||||
this.interactable = false;
|
||||
this.status = !this.status;
|
||||
tween(this.dot.node).to(this.animTime, { position: this.getDotTarget(this.status) }).call(() => {
|
||||
this.interactable = true;
|
||||
this.setSpriteFrame(this.status);
|
||||
|
||||
}).start();
|
||||
|
||||
this.onSwitched?.(this.status);
|
||||
}
|
||||
|
||||
getDotTarget(status: boolean): Vec3 {
|
||||
return status ? this.listTargetPos[1].position : this.listTargetPos[0].position;
|
||||
}
|
||||
|
||||
setSpriteFrame(status: boolean) {
|
||||
if (status) {
|
||||
this.normalSprite = this.spf_on;
|
||||
this.dot.spriteFrame = this.spf_dot_on;
|
||||
this.title.string = "ON";
|
||||
this.title.node.setPositionX(-20.5);
|
||||
this.title.setColor(new Color(83, 251, 255));
|
||||
}
|
||||
else {
|
||||
this.normalSprite = this.spf_off;
|
||||
this.dot.spriteFrame = this.spf_dot_off;
|
||||
this.title.string = "OFF";
|
||||
this.title.node.setPositionX(20.5);
|
||||
this.title.setColor(new Color(105, 119, 150));
|
||||
}
|
||||
}
|
||||
|
||||
public updateTitle() {
|
||||
this.title.string = this.status ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "9c2cc841-bc92-4119-b61a-ae5dc2dfaf1a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "de4d2832-8795-40f8-b5c4-5addee1ed310",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
import { _decorator, Component, Node } from 'cc';
|
||||
import { GameDefine } from '../../cc-game/scripts/config/GameDefine';
|
||||
import { UmLog } from './UmLog';
|
||||
import { UmNativeBridge } from './UmNativeBridge';
|
||||
import { UmClientEvent } from './UmOneToMultiListener';
|
||||
import { UmDeviceInfo } from './UmDeviceInfo';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmAdsManager')
|
||||
export class UmAdsManager extends Component {
|
||||
public static Instance: UmAdsManager = null;
|
||||
interstitialAdCallback: any = null;
|
||||
rewardAdCallback: any = null;
|
||||
|
||||
//Event
|
||||
EVENT_BANNER_AD = "EVENT_BANNER_AD";
|
||||
EVENT_SHOW_INTERSTITIAL_AD = "EVENT_SHOW_INTERSTITIAL_AD";
|
||||
EVENT_SHOW_REWARD_AD = "EVENT_SHOW_REWARD_AD";
|
||||
EVENT_BANNER_AD_POSITION = "EVENT_BANNER_AD_POSITION";
|
||||
|
||||
//Action
|
||||
SHOW_ACTION_KEY = "show";
|
||||
HIDE_ACTION_KEY = "hide";
|
||||
|
||||
//Banner Position
|
||||
public static BANNER_POSITION = {
|
||||
"BANNER_BOTTOM_LEFT": "BOTTOM_LEFT",
|
||||
"BANNER_BOTTOM_CENTER": "BOTTOM_CENTER",
|
||||
"BANNER_BOTTOM_RIGHT": "BOTTOM_RIGHT",
|
||||
"BANNER_TOP_LEFT":"TOP_LEFT",
|
||||
"BANNER_TOP_CENTER": "TOP_CENTER",
|
||||
"BANNER_TOP_RIGHT": "TOP_RIGHT",
|
||||
}
|
||||
|
||||
public static ADS_RESULT = {
|
||||
"SUCCESS": "success",
|
||||
"FAIL": "fail",
|
||||
}
|
||||
|
||||
onLoad(): void {
|
||||
UmAdsManager.Instance = this;
|
||||
UmClientEvent.on(this.EVENT_SHOW_INTERSTITIAL_AD, this.onInterstitialAdCallback.bind(this));
|
||||
UmClientEvent.on(this.EVENT_SHOW_REWARD_AD, this.onRewardCallback.bind(this));
|
||||
}
|
||||
|
||||
onDestroy(): void {
|
||||
UmClientEvent.off(this.EVENT_SHOW_INTERSTITIAL_AD, this.onInterstitialAdCallback.bind(this));
|
||||
UmClientEvent.off(this.EVENT_SHOW_REWARD_AD, this.onRewardCallback.bind(this));
|
||||
}
|
||||
|
||||
//BANNER_ADS
|
||||
public showBanner()
|
||||
{
|
||||
if (!UmDeviceInfo.isMobile) return;
|
||||
UmNativeBridge.instance.onCallNative(this.EVENT_BANNER_AD, this.SHOW_ACTION_KEY);
|
||||
}
|
||||
|
||||
public hideBanner()
|
||||
{
|
||||
if (!UmDeviceInfo.isMobile) return;
|
||||
UmNativeBridge.instance.onCallNative(this.EVENT_BANNER_AD, this.HIDE_ACTION_KEY);
|
||||
}
|
||||
|
||||
public setBannerPosition(position: string)
|
||||
{
|
||||
if (!UmDeviceInfo.isMobile) return;
|
||||
UmNativeBridge.instance.onCallNative(this.EVENT_BANNER_AD_POSITION, position);
|
||||
}
|
||||
|
||||
//INTERSTITIAL_ADS
|
||||
public showInterstitialAd(callback: any)
|
||||
{
|
||||
this.interstitialAdCallback = callback;
|
||||
if (!UmDeviceInfo.isMobile)
|
||||
{
|
||||
this.onInterstitialAdCallback("success");
|
||||
return;
|
||||
}
|
||||
|
||||
UmNativeBridge.instance.onCallNative(this.EVENT_SHOW_INTERSTITIAL_AD);
|
||||
}
|
||||
|
||||
public onInterstitialAdCallback(params: string)
|
||||
{
|
||||
UmLog.log("onInterstitialAdCallback => ", params);
|
||||
let callback = this.interstitialAdCallback;
|
||||
callback?.(params);
|
||||
this.interstitialAdCallback = null;
|
||||
}
|
||||
|
||||
//REWARD_ADS
|
||||
public showRewardAd(callback: any)
|
||||
{
|
||||
this.rewardAdCallback = callback;
|
||||
if (!UmDeviceInfo.isMobile) {
|
||||
this.onRewardCallback("success");
|
||||
return;
|
||||
}
|
||||
|
||||
UmNativeBridge.instance.onCallNative(this.EVENT_SHOW_REWARD_AD);
|
||||
}
|
||||
|
||||
public onRewardCallback(params: string) {
|
||||
UmLog.log("onRewardCallback => ", params);
|
||||
let callback = this.rewardAdCallback;
|
||||
callback?.(params);
|
||||
this.rewardAdCallback = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ccfa1329-9b5c-44b1-a1cb-f02138b705f5",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import { _decorator, Component, Node } from 'cc';
|
||||
import { BUILD_MODE, DEBUG_MODE, UmConfig } from './UmConfig';
|
||||
import { UmDeviceInfo } from './UmDeviceInfo';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmBuildConfig')
|
||||
export class UmBuildConfig extends Component {
|
||||
onLoad(): void {
|
||||
UmConfig.BUILD_MODE = BUILD_MODE.DEBUG;
|
||||
if (UmDeviceInfo.isAndroid)
|
||||
UmConfig.debugMode = DEBUG_MODE.CONSOLE;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "880de110-e7f2-46ea-9b7d-d73a93531ccb",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
import { sys } from 'cc';
|
||||
import { view, ResolutionPolicy, log } from 'cc';
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import * as cc from 'cc';
|
||||
import { UmLog } from './UmLog';
|
||||
import { UmClientEvent } from './UmOneToMultiListener';
|
||||
import { UmConfig } from './UmConfig';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmCanvasResize')
|
||||
export class UmCanvasResize extends Component {
|
||||
public static startFit: number = ResolutionPolicy.SHOW_ALL;
|
||||
public static currentFit: number = ResolutionPolicy.FIXED_WIDTH;
|
||||
|
||||
onLoad() {
|
||||
if (UmCanvasResize.isListenerCanvasResize()) {// && !document.getElementById('GameDiv')
|
||||
window.addEventListener('resize', this._onEventCanvasResized);
|
||||
UmCanvasResize.currentFit = Number(view.getResolutionPolicy);
|
||||
}
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
UmCanvasResize.resetFitCanvasSize();
|
||||
}
|
||||
|
||||
_onEventCanvasResized() {
|
||||
UmLog.log("[Canvas] => _onEventCanvasResized");
|
||||
UmCanvasResize.updateFitCanvasSize();
|
||||
}
|
||||
|
||||
public static isListenerCanvasResize(): boolean {
|
||||
if (sys.isBrowser) {
|
||||
if (sys.isMobile) return true;
|
||||
|
||||
if (UmConfig.isModeDebug) {
|
||||
let url = window.location.href;
|
||||
if (url?.length > 0 && url.includes("http://localhost:")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static updateFitCanvasSize() {
|
||||
const viewSize = cc.screen.windowSize;
|
||||
const designSize = view.getDesignResolutionSize();
|
||||
let windowWidth = viewSize.width;
|
||||
let windowHeight = viewSize.height;
|
||||
let windowRatio = windowWidth * 1.0 / windowHeight;
|
||||
const designRatio = designSize.width * 1.0 / designSize.height;
|
||||
let height = designSize.height;
|
||||
if (windowRatio <= designRatio) {
|
||||
height = designSize.width / viewSize.width * viewSize.height;
|
||||
UmCanvasResize.currentFit = ResolutionPolicy.FIXED_WIDTH;
|
||||
log("[Canvas] => updateFitCanvasSize ==> ", designSize.width, height, " ==> FIT_WIDTH");
|
||||
}
|
||||
else {
|
||||
UmCanvasResize.currentFit = ResolutionPolicy.SHOW_ALL
|
||||
log("[Canvas] => updateFitCanvasSize ==> ", designSize.width, height, " ==> FIT_SHOW_ALL");
|
||||
}
|
||||
view.setResolutionPolicy(UmCanvasResize.currentFit);
|
||||
UmClientEvent.dispatchEvent("canvas-resize");
|
||||
}
|
||||
|
||||
public static updateCurrentFitCanvasSize() {
|
||||
log("[Canvas] => updateCurrentFitCanvasSize");
|
||||
view.setResolutionPolicy(UmCanvasResize.currentFit);
|
||||
}
|
||||
|
||||
public static resetFitCanvasSize() {
|
||||
if (UmCanvasResize.isListenerCanvasResize()) {
|
||||
view.setResolutionPolicy(UmCanvasResize.startFit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7f0739c2-588e-4e1c-891f-9fa62e6a6e21",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
import { sys } from "cc";
|
||||
|
||||
export enum BUILD_MODE {
|
||||
DEBUG = 0,
|
||||
RELEASE = 1
|
||||
}
|
||||
|
||||
export enum DEBUG_MODE {
|
||||
NONE = 0,
|
||||
CC = 1,
|
||||
CONSOLE = 2,
|
||||
}
|
||||
|
||||
export class UmConfig {
|
||||
private static DEBUG_MODE: number = DEBUG_MODE.CC;
|
||||
public static BUILD_MODE: number = BUILD_MODE.DEBUG;
|
||||
static CLIENT_VERSION: string = "0.0.1";
|
||||
|
||||
public static get platform(): string {
|
||||
let platform_name = "";
|
||||
if (sys.isBrowser) {
|
||||
platform_name = "web";
|
||||
}
|
||||
else if (sys.OS.ANDROID == sys.os) {
|
||||
platform_name = "android";
|
||||
}
|
||||
else if (sys.OS.IOS == sys.os) {
|
||||
platform_name = "ios";
|
||||
}
|
||||
else if (sys.OS.WINDOWS == sys.os) {
|
||||
platform_name = "windows";
|
||||
}
|
||||
else if (sys.OS.OSX == sys.os) {
|
||||
platform_name = "macintosh";
|
||||
}
|
||||
return platform_name;
|
||||
}
|
||||
|
||||
public static get debugMode(): DEBUG_MODE {
|
||||
switch (this.DEBUG_MODE) {
|
||||
case 0:
|
||||
return DEBUG_MODE.NONE;
|
||||
case 1:
|
||||
return DEBUG_MODE.CC;
|
||||
case 2:
|
||||
return DEBUG_MODE.CONSOLE;
|
||||
}
|
||||
return DEBUG_MODE.NONE;
|
||||
}
|
||||
|
||||
public static set debugMode(value: DEBUG_MODE)
|
||||
{
|
||||
if (this.BUILD_MODE == BUILD_MODE.RELEASE)
|
||||
this.DEBUG_MODE = DEBUG_MODE.NONE;
|
||||
else
|
||||
this.DEBUG_MODE = value;
|
||||
}
|
||||
|
||||
public static get isRoundMoney(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static get digitRound(): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static get isModeDebug(): boolean {
|
||||
return this.debugMode != DEBUG_MODE.NONE;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "eaffae53-cf12-483c-9bd6-c5430cac3a6b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
import * as cc from 'cc';
|
||||
import { sys } from 'cc';
|
||||
import { UmUtil } from './UmUtil';
|
||||
|
||||
export class UmDeviceInfo {
|
||||
public static safeArenaViewSize: cc.Size = cc.Size.ZERO;
|
||||
|
||||
public static DEVICE_INFO = {
|
||||
os: sys.os,
|
||||
osVersion: sys.osVersion,
|
||||
platform: sys.platform,
|
||||
browser: sys.browserType,
|
||||
browserVersion: sys.browserVersion,
|
||||
language: sys.language,
|
||||
ssid: UmUtil.uuid(),
|
||||
model: UmDeviceInfo.getModel(),
|
||||
manufactor: UmDeviceInfo.getManufactor()
|
||||
};
|
||||
|
||||
public static get device_info() {
|
||||
return UmDeviceInfo.DEVICE_INFO;
|
||||
}
|
||||
|
||||
public static getUUID(): string {
|
||||
return UmUtil.uuid();
|
||||
}
|
||||
|
||||
public static getModel(): string {
|
||||
let result = "";
|
||||
if (!sys.isBrowser) {
|
||||
if (sys.os == sys.OS.ANDROID) {
|
||||
result = cc.native.reflection.callStaticMethod("com/cocos/game/AppActivity", "getModel", "()Ljava/lang/String;");
|
||||
}
|
||||
else if (sys.os == sys.OS.IOS) {
|
||||
result = cc.native.reflection.callStaticMethod("NativeBridge", "GetModel:", "0");
|
||||
}
|
||||
}
|
||||
// console.log("getModel ==> ", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static getManufactor(): string {
|
||||
let result = "";
|
||||
if (!sys.isBrowser) {
|
||||
if (sys.os == sys.OS.ANDROID) {
|
||||
result = cc.native.reflection.callStaticMethod("com/cocos/game/AppActivity", "getManufactor", "()Ljava/lang/String;");
|
||||
}
|
||||
else if (sys.os == sys.OS.IOS) {
|
||||
result = "apple";
|
||||
}
|
||||
}
|
||||
// console.log("getManufactor ==> ", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static setSafeArenaViewSize(size: cc.Size) {
|
||||
UmDeviceInfo.safeArenaViewSize = size;
|
||||
}
|
||||
|
||||
public static get isMobile(): boolean {
|
||||
return cc.sys.isMobile;
|
||||
}
|
||||
|
||||
public static get isAndroid(): boolean {
|
||||
return cc.sys.os == cc.sys.OS.ANDROID;
|
||||
}
|
||||
|
||||
public static get isIos(): boolean {
|
||||
return cc.sys.os == cc.sys.OS.IOS;
|
||||
}
|
||||
|
||||
public static get isBrowser(): boolean {
|
||||
return cc.sys.isBrowser;
|
||||
}
|
||||
|
||||
public static get isNative(): boolean {
|
||||
return !this.isBrowser;
|
||||
}
|
||||
|
||||
public static get isIosNative(): boolean {
|
||||
return this.isNative && this.isIos;
|
||||
}
|
||||
|
||||
public static get isAndroidNative(): boolean {
|
||||
return this.isNative && this.isAndroid;
|
||||
}
|
||||
|
||||
public static get isDesktopBrowser(): boolean {
|
||||
return this.isBrowser && !this.isMobile;
|
||||
}
|
||||
|
||||
public static get isMobileBrowser(): boolean {
|
||||
return this.isBrowser && this.isMobile;
|
||||
}
|
||||
|
||||
public static get isAndroidBrowser(): boolean {
|
||||
return this.isBrowser && this.isAndroid;
|
||||
}
|
||||
|
||||
public static get isIosBrowser(): boolean {
|
||||
return this.isBrowser && this.isIos;
|
||||
}
|
||||
|
||||
public static get isCanVibrate() {
|
||||
if (this.isMobile) {
|
||||
if (this.isBrowser && this.isIos) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static get browserType(): string {
|
||||
return cc.sys.browserType.toString().toLocaleLowerCase();
|
||||
}
|
||||
|
||||
public static get isBrowserSafari(): boolean {
|
||||
return this.isBrowser && this.browserType == 'safari';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "01b1b287-2fc9-482e-806c-33e7f274599e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
import { debug, error, log, warn } from "cc";
|
||||
import { UmConfig, DEBUG_MODE } from "./UmConfig";
|
||||
|
||||
export class UmLog {
|
||||
public static log(message?: any, ...optionalParams: any[]): void {
|
||||
switch (UmConfig.debugMode) {
|
||||
case DEBUG_MODE.NONE:
|
||||
break;
|
||||
case DEBUG_MODE.CC:
|
||||
log(message, ...optionalParams);
|
||||
break;
|
||||
case DEBUG_MODE.CONSOLE:
|
||||
console.log(message, ...optionalParams);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static error(message?: any, ...optionalParams: any[]): void {
|
||||
switch (UmConfig.debugMode) {
|
||||
case DEBUG_MODE.NONE:
|
||||
break;
|
||||
case DEBUG_MODE.CC:
|
||||
error(message, ...optionalParams);
|
||||
break;
|
||||
case DEBUG_MODE.CONSOLE:
|
||||
console.error(message, ...optionalParams);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static warn(message?: any, ...optionalParams: any[]): void {
|
||||
switch (UmConfig.debugMode) {
|
||||
case DEBUG_MODE.NONE:
|
||||
break;
|
||||
case DEBUG_MODE.CC:
|
||||
warn(message, ...optionalParams);
|
||||
break;
|
||||
case DEBUG_MODE.CONSOLE:
|
||||
console.warn(message, ...optionalParams);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static debug(message?: any, ...optionalParams: any[]): void {
|
||||
switch (UmConfig.debugMode) {
|
||||
case DEBUG_MODE.NONE:
|
||||
break;
|
||||
case DEBUG_MODE.CC:
|
||||
debug(message, ...optionalParams);
|
||||
break;
|
||||
case DEBUG_MODE.CONSOLE:
|
||||
console.debug(message, ...optionalParams);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "fa9c8741-326d-40b2-811d-ab100ea26862",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
import { UmConfig } from './UmConfig';
|
||||
|
||||
declare global {
|
||||
interface Number {
|
||||
toMoneyKMB(digits: number): string;
|
||||
toStringWithPlusSymbol(isPlusZero?: boolean): string;
|
||||
formatMoney(): string;
|
||||
formatInt(): string;
|
||||
formatNumberLessThan10(): string;
|
||||
formatMoneyKMB(): string;
|
||||
formatMoneyInTable(): string;
|
||||
pformatMoneyWC(): string;
|
||||
}
|
||||
}
|
||||
|
||||
Number.prototype.toMoneyKMB = function (digits: number): string {
|
||||
var si = [
|
||||
{ value: 1, symbol: "" },
|
||||
{ value: 1E3, symbol: "K" },
|
||||
{ value: 1E6, symbol: "M" },
|
||||
{ value: 1E9, symbol: "B" },
|
||||
{ value: 1E12, symbol: "T" },
|
||||
{ value: 1E15, symbol: "P" },
|
||||
{ value: 1E18, symbol: "E" }
|
||||
];
|
||||
var rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
|
||||
var i;
|
||||
let number = Number(this);
|
||||
let abs_number = Math.abs(number);
|
||||
|
||||
for (i = si.length - 1; i > 0; i--) {
|
||||
if (abs_number >= si[i].value) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (number / si[i].value).truncDigits(digits).toString().replace(rx, "$1") + si[i].symbol;
|
||||
}
|
||||
|
||||
Number.prototype.toStringWithPlusSymbol = function (isPlusZero?: boolean): string {
|
||||
if (isPlusZero) {
|
||||
return this >= 0 ? `+${this.formatMoneyInTable()}` : this.formatMoneyInTable();
|
||||
}
|
||||
else {
|
||||
return this > 0 ? `+${this.formatMoneyInTable()}` : this.formatMoneyInTable();
|
||||
}
|
||||
}
|
||||
|
||||
Number.prototype.formatMoney = function (): string {
|
||||
// let format = Number(this).truncDigits(4).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
let str = Number(this).truncDigits(UmConfig.digitRound).toString();
|
||||
let regx = /(\d{1,3})(\d{3}(?:,|$))/;
|
||||
let currStr;
|
||||
do {
|
||||
currStr = (currStr || str.split(`.`)[0]).replace(regx, `$1,$2`)
|
||||
} while (currStr.match(regx)) //Stop when there's no match & null's returned
|
||||
return (str.split(`.`)[1]) ? currStr.concat(`.`, str.split(`.`)[1]) : currStr;
|
||||
}
|
||||
|
||||
Number.prototype.formatInt = function (): string {
|
||||
return Number(this).roundDigits(0).toLocaleString('en-US');
|
||||
}
|
||||
|
||||
Number.prototype.formatNumberLessThan10 = function (): string {
|
||||
return ('0' + Number(this)).slice(-2);
|
||||
}
|
||||
|
||||
Number.prototype.formatMoneyKMB = function (): string {
|
||||
if (UmConfig.isRoundMoney) {
|
||||
return Number(this).toMoneyKMB(1);
|
||||
}
|
||||
else {
|
||||
return Number(this).formatMoney();
|
||||
}
|
||||
}
|
||||
|
||||
Number.prototype.formatMoneyInTable = function (): string {
|
||||
let number = Number(this);
|
||||
if (UmConfig.isRoundMoney) {
|
||||
if (Math.abs(number) < 10000) {
|
||||
return number.formatMoney();
|
||||
}
|
||||
else {
|
||||
return number.toMoneyKMB(1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (Math.abs(number) < 1000) {
|
||||
return number.formatMoney();
|
||||
}
|
||||
else {
|
||||
return number.toMoneyKMB(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Number.prototype.pformatMoneyWC = function (): string {
|
||||
return Number(this).formatMoney();
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "60cdf1b9-fb63-400b-b752-d1c1913f9eca",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
import * as cc from 'cc';
|
||||
import { _decorator, Component } from 'cc';
|
||||
import { UmDeviceInfo } from './UmDeviceInfo';
|
||||
import { UmClientEvent } from './UmOneToMultiListener';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmNativeBridge')
|
||||
export class UmNativeBridge extends Component {
|
||||
static _instance: UmNativeBridge;
|
||||
static get instance() {
|
||||
if (UmNativeBridge._instance) {
|
||||
return UmNativeBridge._instance;
|
||||
}
|
||||
|
||||
UmNativeBridge._instance = new UmNativeBridge();
|
||||
return UmNativeBridge._instance;
|
||||
}
|
||||
|
||||
public vibrate() {
|
||||
//check web desktop
|
||||
if (UmDeviceInfo.isDesktopBrowser)
|
||||
return;
|
||||
|
||||
//check mobile browser (ios can not vibrate in browser)
|
||||
if (UmDeviceInfo.isMobileBrowser && !UmDeviceInfo.isIos) {
|
||||
navigator?.vibrate([500]);
|
||||
return;
|
||||
}
|
||||
|
||||
//check native
|
||||
if (!UmDeviceInfo.isNative)
|
||||
return;
|
||||
|
||||
//android native
|
||||
if (UmDeviceInfo.isAndroid) {
|
||||
cc.native.reflection.callStaticMethod("com/cocos/game/AppActivity", "vibrate", "(I)V", 600);
|
||||
return;
|
||||
}
|
||||
|
||||
//ios native
|
||||
if (UmDeviceInfo.isIos) {
|
||||
cc.native.reflection.callStaticMethod("NativeBridge", "VibrateWithIntensity:", "0.5");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public getTokenFromDeepLink(): string {
|
||||
if (UmDeviceInfo.isAndroidNative) {
|
||||
return cc.native.reflection.callStaticMethod("com/cocos/game/AppActivity", "getTokenFromDeepLink", "()Ljava/lang/String;");
|
||||
}
|
||||
|
||||
if (UmDeviceInfo.isIosNative) {
|
||||
return cc.native.reflection.callStaticMethod("NativeBridge", "GetTokenFromDeepLink:", "0");
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public onCallNative(evt: string, content: string = "") {
|
||||
if (UmDeviceInfo.isAndroidNative) {
|
||||
return cc.native.reflection.callStaticMethod("com/cocos/game/AppActivity", "onCallFromJavascript", "(Ljava/lang/String;Ljava/lang/String;)V", evt, content);
|
||||
}
|
||||
|
||||
// if (UmDeviceInfo.isIosNative) {
|
||||
// return cc.native.reflection.callStaticMethod("NativeBridge", "GetTokenFromDeepLink:", "0");
|
||||
// }
|
||||
}
|
||||
|
||||
public onNativeCallJS(evt: string, params: string)
|
||||
{
|
||||
UmClientEvent.dispatchEvent(evt, params);
|
||||
}
|
||||
}
|
||||
|
||||
window.NativeCallJS = (evt: string, params: string) => {
|
||||
console.log('NativeCallJS------------------------> EVT ' + typeof evt + ' = ' + evt + " ==>> " + params);
|
||||
UmNativeBridge.instance.onNativeCallJS(evt, params);
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "4bdd59f4-01a6-4c68-ab32-c199366aae2f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
// Learn cc.Class:
|
||||
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/class.html
|
||||
// Learn Attribute:
|
||||
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/reference/attributes.html
|
||||
// Learn life-cycle callbacks:
|
||||
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
|
||||
// - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/life-cycle-callbacks.html
|
||||
|
||||
import { _decorator, error } from "cc";
|
||||
|
||||
const { ccclass } = _decorator;
|
||||
|
||||
@ccclass("UmOneToMultiListener")
|
||||
export class UmOneToMultiListener {
|
||||
static handlers: { [name: string]: { handler: Function, target: any }[] };
|
||||
static supportEvent: { [name: string]: string };
|
||||
|
||||
public static on(eventName: string, handler: Function, target?: any) {
|
||||
const objHandler = { handler: handler, target: target };
|
||||
let handlerList = this.handlers[eventName];
|
||||
if (!handlerList) {
|
||||
handlerList = [];
|
||||
this.handlers[eventName] = handlerList;
|
||||
}
|
||||
|
||||
for (var i = 0; i < handlerList.length; i++) {
|
||||
if (!handlerList[i]) {
|
||||
handlerList[i] = objHandler;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
handlerList.push(objHandler);
|
||||
|
||||
return handlerList.length;
|
||||
};
|
||||
|
||||
public static off(eventName: string, handler: Function, target?: any) {
|
||||
const handlerList = this.handlers[eventName];
|
||||
|
||||
if (!handlerList) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < handlerList.length; i++) {
|
||||
const oldObj = handlerList[i];
|
||||
if (oldObj.handler === handler && (!target || target === oldObj.target)) {
|
||||
handlerList.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static offAll() {
|
||||
this.handlers = {};
|
||||
}
|
||||
|
||||
public static dispatchEvent(eventName: string, ...args: any[]) {
|
||||
const handlerList = this.handlers[eventName];
|
||||
|
||||
const params = [];
|
||||
let i;
|
||||
for (i = 1; i < arguments.length; i++) {
|
||||
params.push(arguments[i]);
|
||||
}
|
||||
|
||||
if (!handlerList) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < handlerList.length; i++) {
|
||||
const objHandler = handlerList[i];
|
||||
if (objHandler.handler) {
|
||||
objHandler.handler.apply(objHandler.target, args);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static setSupportEventList(arrSupportEvent: string[]) {
|
||||
if (!(arrSupportEvent instanceof Array)) {
|
||||
error("supportEvent was not array");
|
||||
return false;
|
||||
}
|
||||
|
||||
this.supportEvent = {};
|
||||
for (let i in arrSupportEvent) {
|
||||
const eventName = arrSupportEvent[i];
|
||||
this.supportEvent[eventName] = i;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
@ccclass("clientEventUm")
|
||||
export class UmClientEvent extends UmOneToMultiListener {
|
||||
static handlers = {};
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "a92f3f99-339e-4b5f-b6ee-bcab5df4aa36",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
import { _decorator, Component } from 'cc';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UmStorageManager')
|
||||
export class UmStorageManager extends Component {
|
||||
static _instance: UmStorageManager;
|
||||
|
||||
private _user_id: string = "";
|
||||
static get instance() {
|
||||
if (UmStorageManager._instance) {
|
||||
return UmStorageManager._instance;
|
||||
}
|
||||
|
||||
UmStorageManager._instance = new UmStorageManager();
|
||||
UmStorageManager._instance.initData();
|
||||
return UmStorageManager._instance;
|
||||
}
|
||||
|
||||
initData() {
|
||||
this._user_id = this.getUserId();
|
||||
}
|
||||
|
||||
getNumberByKey(key: string, default_value: number = 0, isUser: boolean = false): number {
|
||||
key = this._convertKey(key, isUser);
|
||||
let result = localStorage.getItem(key);
|
||||
return result ? Number(result) : default_value;
|
||||
}
|
||||
|
||||
public setNumberByKey(key: string, value: number, isUser: boolean = false) {
|
||||
key = this._convertKey(key, isUser);
|
||||
localStorage.setItem(key, value.toString());
|
||||
}
|
||||
|
||||
public getStringByKey(key: string, default_value: string = "", isUser: boolean = false): string {
|
||||
key = this._convertKey(key, isUser);
|
||||
let result = localStorage.getItem(key);
|
||||
return result ? result : default_value;
|
||||
}
|
||||
|
||||
public setStringByKey(key: string, value: string, isUser: boolean = false) {
|
||||
key = this._convertKey(key, isUser);
|
||||
localStorage.setItem(key, value);
|
||||
}
|
||||
|
||||
public getBooleanByKey(key: string, default_value: boolean = false, isUser: boolean = false): boolean {
|
||||
key = this._convertKey(key, isUser);
|
||||
let result = localStorage.getItem(key);
|
||||
if (result) {
|
||||
return result === "true" ? true : false;
|
||||
}
|
||||
else {
|
||||
return default_value;
|
||||
}
|
||||
}
|
||||
|
||||
public setBooleanByKey(key: string, value: boolean, isUser: boolean = true) {
|
||||
key = this._convertKey(key, isUser);
|
||||
localStorage.setItem(key, value ? "true" : "false");
|
||||
}
|
||||
|
||||
public removeKey(key: string)
|
||||
{
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
|
||||
public removeAllKey()
|
||||
{
|
||||
localStorage.clear();
|
||||
}
|
||||
|
||||
private _convertKey(key: string, isUser: boolean): string {
|
||||
if (isUser) {
|
||||
key = this._user_id + key;
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
public encrypt(input: string): string {
|
||||
return input?.length > 0 ? btoa(new TextEncoder().encode(input).toString()) : "";
|
||||
}
|
||||
|
||||
public decrypt(input: string): string {
|
||||
return input?.length > 0 ? new TextDecoder().decode(new Uint8Array(atob(input).split(',').map((s: string) => { return Number(s) }))).toString() : "";
|
||||
}
|
||||
|
||||
//------- USER ID ----------------------------------
|
||||
public setUserId(userId: string) {
|
||||
this._user_id = userId;
|
||||
localStorage.setItem("user_id", userId);
|
||||
}
|
||||
|
||||
public getUserId(): string {
|
||||
let result = localStorage.getItem("user_id");
|
||||
return result ? result : "";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "1a710ebb-0de5-45e0-938a-c40324678c94",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,753 @@
|
|||
import * as cc from "cc";
|
||||
import { Vec2 } from "cc";
|
||||
import { Color } from "cc";
|
||||
import { _decorator, ITweenOption, Node, sp, Tween, tween, UIOpacity, UITransform, Vec3 } from "cc";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
declare const pako: any;
|
||||
|
||||
@ccclass("UmUtil")
|
||||
export class UmUtil {
|
||||
/**
|
||||
* !#zh 拷贝object。
|
||||
*/
|
||||
public static clone(sObj: any) {
|
||||
if (sObj === null || typeof sObj !== "object") {
|
||||
return sObj;
|
||||
}
|
||||
|
||||
let s: any = {};
|
||||
if (sObj.constructor === Array) {
|
||||
s = [];
|
||||
}
|
||||
|
||||
for (const i in sObj) {
|
||||
if (sObj.hasOwnProperty(i)) {
|
||||
s[i] = this.clone(sObj[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将object转化为数组。
|
||||
*/
|
||||
public static objectToArray(srcObj: any) {
|
||||
|
||||
const resultArr = [];
|
||||
|
||||
// to array
|
||||
for (let key in srcObj) {
|
||||
if (!srcObj.hasOwnProperty(key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
resultArr.push(srcObj[key]);
|
||||
}
|
||||
|
||||
return resultArr;
|
||||
}
|
||||
|
||||
/**
|
||||
* !#zh 将数组转化为object。
|
||||
*/
|
||||
public static arrayToObject(srcObj: any, objectKey: any) {
|
||||
|
||||
const resultObj: any = {};
|
||||
|
||||
// to object
|
||||
for (let key in srcObj) {
|
||||
if (!srcObj.hasOwnProperty(key) || !srcObj[key][objectKey]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
resultObj[srcObj[key][objectKey]] = srcObj[key];
|
||||
}
|
||||
|
||||
return resultObj;
|
||||
}
|
||||
|
||||
// 根据权重,计算随机内容
|
||||
public static getWeightRandIndex(weightArr: any, totalWeight: number) {
|
||||
const randWeight = Math.floor(Math.random() * totalWeight);
|
||||
let sum = 0;
|
||||
let weightIndex = 0;
|
||||
for (weightIndex; weightIndex < weightArr.length; weightIndex++) {
|
||||
sum += weightArr[weightIndex];
|
||||
if (randWeight < sum) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return weightIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从n个数中获取m个随机数
|
||||
* @param {Number} n 总数
|
||||
* @param {Number} m 获取数
|
||||
* @returns {Array} array 获取数列
|
||||
*/
|
||||
public static getRandomNFromM(n: number, m: number) {
|
||||
const array: number[] = [];
|
||||
let intRd = 0;
|
||||
let count = 0;
|
||||
|
||||
while (count < m) {
|
||||
if (count >= n + 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
intRd = this.getRandomInt(0, n);
|
||||
let flag = 0;
|
||||
for (let i = 0; i < count; i++) {
|
||||
if (array[i] === intRd) {
|
||||
flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag === 0) {
|
||||
array[count] = intRd;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
public static getRandomInt(min: number, max: number) {
|
||||
const r = Math.random();
|
||||
const rr = r * (max - min + 1) + min;
|
||||
return Math.floor(rr);
|
||||
}
|
||||
|
||||
public static getStringLength(render: string) {
|
||||
const strArr = render;
|
||||
let len = 0;
|
||||
for (let i = 0, n = strArr.length; i < n; i++) {
|
||||
const val = strArr.charCodeAt(i);
|
||||
if (val <= 255) {
|
||||
len = len + 1;
|
||||
}
|
||||
else {
|
||||
len = len + 2;
|
||||
}
|
||||
}
|
||||
|
||||
return Math.ceil(len / 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断传入的参数是否为空的Object。数组或undefined会返回false
|
||||
* @param obj
|
||||
*/
|
||||
public static isEmptyObject(obj: any) {
|
||||
let result = true;
|
||||
if (obj && obj.constructor === Object) {
|
||||
for (const key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static formatNum(num: number) {
|
||||
// 0 和负数均返回 NaN。特殊处理。
|
||||
if (num <= 0) {
|
||||
return '0';
|
||||
}
|
||||
|
||||
const k = 1000;
|
||||
const sizes = ['', '', 'K', 'M', 'B'];
|
||||
const i = Math.round(Math.log(num) / Math.log(k));
|
||||
return parseInt((num / (Math.pow(k, i - 1 < 0 ? 0 : i - 1))).toString(), 10) + sizes[i];
|
||||
}
|
||||
|
||||
public static formatMoneyWithFraction(num: number, fraction?: number) {
|
||||
return num.toFixed(fraction).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是新的一天
|
||||
* @param {Object|Number} dateValue 时间对象 todo MessageCenter 与 pve 相关的时间存储建议改为 Date 类型
|
||||
* @returns {boolean}
|
||||
*/
|
||||
public static isNewDay(dateValue: any) {
|
||||
// todo:是否需要判断时区?
|
||||
const oldDate = new Date(dateValue);
|
||||
const curDate = new Date();
|
||||
|
||||
const oldYear = oldDate.getFullYear();
|
||||
const oldMonth = oldDate.getMonth();
|
||||
const oldDay = oldDate.getDate();
|
||||
const curYear = curDate.getFullYear();
|
||||
const curMonth = curDate.getMonth();
|
||||
const curDay = curDate.getDate();
|
||||
|
||||
if (curYear > oldYear) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if (curMonth > oldMonth) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if (curDay > oldDay) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static getPropertyCount(o: Object) {
|
||||
let n, count = 0;
|
||||
for (n in o) {
|
||||
if (o.hasOwnProperty(n)) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回一个差异化数组(将array中diff里的值去掉)
|
||||
* @param array
|
||||
* @param diff
|
||||
*/
|
||||
public static difference(array: any, diff: any) {
|
||||
const result: number[] = [];
|
||||
if (array.constructor !== Array || diff.constructor !== Array) {
|
||||
return result;
|
||||
}
|
||||
|
||||
const length = array.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (diff.indexOf(array[i]) === -1) {
|
||||
result.push(array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 模拟传msg的uuid
|
||||
public static simulationUUID() {
|
||||
function s4() {
|
||||
return Math.floor((1 + Math.random()) * 0x10000)
|
||||
.toString(16)
|
||||
.substring(1);
|
||||
}
|
||||
|
||||
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
|
||||
s4() + '-' + s4() + s4() + s4();
|
||||
}
|
||||
|
||||
public static trim(str: string) {
|
||||
return str.replace(/(^\s*)|(\s*$)/g, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前时间是否在有效时间内
|
||||
* @param {String|Number} start 起始时间。带有时区信息
|
||||
* @param {String|Number} end 结束时间。带有时区信息
|
||||
*/
|
||||
public static isNowValid(start: string | number, end: string | number) {
|
||||
const startTime = new Date(start);
|
||||
const endTime = new Date(end);
|
||||
let result = false;
|
||||
|
||||
if (startTime.getDate() + '' !== 'NaN' && endTime.getDate() + '' !== 'NaN') {
|
||||
const curDate = new Date();
|
||||
result = curDate < endTime && curDate > startTime;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static getDeltaDays(start: string | number, end: string | number) {
|
||||
const startData = new Date(start);
|
||||
const endData = new Date(end);
|
||||
|
||||
const startYear = startData.getFullYear();
|
||||
const startMonth = startData.getMonth() + 1;
|
||||
const startDate = startData.getDate();
|
||||
const endYear = endData.getFullYear();
|
||||
const endMonth = endData.getMonth() + 1;
|
||||
const endDate = endData.getDate();
|
||||
|
||||
start = new Date(startYear + '/' + startMonth + '/' + startDate + ' GMT+0800').getTime();
|
||||
end = new Date(endYear + '/' + endMonth + '/' + endDate + ' GMT+0800').getTime();
|
||||
|
||||
const deltaTime = end - start;
|
||||
return Math.floor(deltaTime / (24 * 60 * 60 * 1000));
|
||||
}
|
||||
|
||||
public static getMin(array: any) {
|
||||
let result = 0;
|
||||
if (array.constructor === Array) {
|
||||
const length = array.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (i === 0) {
|
||||
result = Number(array[0]);
|
||||
}
|
||||
else {
|
||||
result = result > Number(array[i]) ? Number(array[i]) : result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static formatTwoDigits(time: number) {
|
||||
return (Array(2).join('0') + time).slice(-2);
|
||||
}
|
||||
|
||||
public static formatDate(date: Date, fmt: string) {
|
||||
const o: { [name: string]: number } = {
|
||||
"M+": date.getMonth() + 1, //月份
|
||||
"d+": date.getDate(), //日
|
||||
"h+": date.getHours(), //小时
|
||||
"m+": date.getMinutes(), //分
|
||||
"s+": date.getSeconds(), //秒
|
||||
"q+": Math.floor((date.getMonth() + 3) / 3), //季度
|
||||
"S": date.getMilliseconds() //毫秒
|
||||
};
|
||||
|
||||
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (const k in o)
|
||||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (`${o[k]}`) : ((`00${o[k]}`).substr(("" + o[k]).length)));
|
||||
return fmt;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static getDay(time: number, splitChar: string = '-') {
|
||||
const date = new Date(time);
|
||||
return date.getDate() + splitChar + (date.getMonth() + 1) + splitChar + date.getFullYear();
|
||||
}
|
||||
|
||||
|
||||
public static getTime(): number
|
||||
{
|
||||
return (new Date()).getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化钱数,超过10000 转换位 10K 10000K 转换为 10M
|
||||
*/
|
||||
public static formatMoney(money: number) {
|
||||
const arrUnit = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y', 'B', 'N', 'D'];
|
||||
|
||||
let strValue = '';
|
||||
for (let idx = 0; idx < arrUnit.length; idx++) {
|
||||
if (money >= 10000) {
|
||||
money /= 1000;
|
||||
}
|
||||
else {
|
||||
strValue = Math.floor(money) + arrUnit[idx];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (strValue === '') {
|
||||
strValue = Math.floor(money) + 'U'; //超过最大值就加个U
|
||||
}
|
||||
|
||||
return strValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据剩余秒数格式化剩余时间 返回 HH:MM:SS
|
||||
* @param {Number} leftSec
|
||||
*/
|
||||
public static formatTimeForSecond(leftSec: number) {
|
||||
let timeStr = '';
|
||||
const sec = leftSec % 60;
|
||||
|
||||
let leftMin = Math.floor(leftSec / 60);
|
||||
leftMin = leftMin < 0 ? 0 : leftMin;
|
||||
|
||||
const hour = Math.floor(leftMin / 60);
|
||||
const min = leftMin % 60;
|
||||
|
||||
if (hour > 0) {
|
||||
timeStr += hour > 9 ? hour.toString() : '0' + hour;
|
||||
timeStr += ':';
|
||||
}
|
||||
|
||||
timeStr += min > 9 ? min.toString() : '0' + min;
|
||||
timeStr += ':';
|
||||
timeStr += sec > 9 ? sec.toString() : '0' + sec;
|
||||
return timeStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据剩余毫秒数格式化剩余时间 返回 HH:MM:SS
|
||||
*
|
||||
* @param {Number} ms
|
||||
*/
|
||||
public static formatTimeForMillisecond(ms: number) {
|
||||
let second = Math.floor(ms / 1000 % 60);
|
||||
let minute = Math.floor(ms / 1000 / 60 % 60);
|
||||
let hour = Math.floor(ms / 1000 / 60 / 60);
|
||||
let strSecond = second < 10 ? '0' + second : second;
|
||||
let strMinute = minute < 10 ? '0' + minute : minute;
|
||||
let strHour = hour < 10 ? '0' + hour : hour;
|
||||
return `${strSecond}:${strMinute}:${strHour}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 需要将pako进行引入,目前已经去除了压缩算法的需要,如需要使用需引入库文件
|
||||
* 将字符串进行压缩
|
||||
* @param {String} str
|
||||
*/
|
||||
public static zip(str: string) {
|
||||
const binaryString = pako.gzip(encodeURIComponent(str), { to: 'string' });
|
||||
// @ts-ignore
|
||||
return this.base64encode(binaryString);
|
||||
}
|
||||
|
||||
public static rand(arr: any) {
|
||||
let arrClone = this.clone(arr);
|
||||
// 首先从最大的数开始遍历,之后递减
|
||||
for (let i = arrClone.length - 1; i >= 0; i--) {
|
||||
// 随机索引值randomIndex是从0-arrClone.length中随机抽取的
|
||||
const randomIndex = Math.floor(Math.random() * (i + 1));
|
||||
// 下面三句相当于把从数组中随机抽取到的值与当前遍历的值互换位置
|
||||
const itemIndex = arrClone[randomIndex];
|
||||
arrClone[randomIndex] = arrClone[i];
|
||||
arrClone[i] = itemIndex;
|
||||
}
|
||||
// 每一次的遍历都相当于把从数组中随机抽取(不重复)的一个元素放到数组的最后面(索引顺序为:len-1,len-2,len-3......0)
|
||||
return arrClone;
|
||||
}
|
||||
|
||||
public static randRange(min: any, max: any) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
public static getPostionNodeInOtherNode(spaceNode: any, targetNode: any) {
|
||||
if (targetNode.parent == null) {
|
||||
return null;
|
||||
}
|
||||
let pos = new Vec3(0, 0, 0);
|
||||
const targetNodeComponent = targetNode.parent.getComponent(UITransform);
|
||||
const spaceNodeComponent = spaceNode.getComponent(UITransform);
|
||||
if (!targetNodeComponent) {
|
||||
targetNode.parent.addComponent(UITransform);
|
||||
}
|
||||
if (!spaceNodeComponent) {
|
||||
spaceNode.addComponent(UITransform);
|
||||
}
|
||||
pos = targetNodeComponent.convertToWorldSpaceAR(targetNode.getPosition());
|
||||
return spaceNodeComponent ? spaceNodeComponent.convertToNodeSpaceAR(pos) : pos;
|
||||
}
|
||||
|
||||
public static getPointInNodeFromWorldPoint(worldPoint: Vec3, node: Node) {
|
||||
return node.getComponent(UITransform)?.convertToNodeSpaceAR(worldPoint);
|
||||
}
|
||||
|
||||
|
||||
public static validURL(str: string) {
|
||||
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
|
||||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
|
||||
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
|
||||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
|
||||
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
|
||||
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
|
||||
return !!pattern.test(str);
|
||||
}
|
||||
|
||||
public static deepEqual(object1: any, object2: any) {
|
||||
const keys1 = Object.keys(object1);
|
||||
const keys2 = Object.keys(object2);
|
||||
if (keys1.length !== keys2.length) {
|
||||
return false;
|
||||
}
|
||||
for (const key of keys1) {
|
||||
const val1 = object1[key];
|
||||
const val2 = object2[key];
|
||||
const areObjects = this.isObject(val1) && this.isObject(val2);
|
||||
if (
|
||||
areObjects && !this.deepEqual(val1, val2) ||
|
||||
!areObjects && val1 !== val2
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static isObject(object: any) {
|
||||
return object != null && typeof object === 'object';
|
||||
}
|
||||
|
||||
public static getKeyObject(obj: any, value: any) {
|
||||
let result: string = "";
|
||||
for (let [key, val] of Object.entries(obj)) {
|
||||
if (value === val) {
|
||||
result = key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static getHighestSiblingIndexOfChild(parentNode: Node): number {
|
||||
let highestSiblingIndex: number = 0;
|
||||
parentNode.children.forEach((child: Node, index: number) => {
|
||||
const siblingIndex = child.getSiblingIndex();
|
||||
if (highestSiblingIndex < siblingIndex) {
|
||||
highestSiblingIndex = siblingIndex;
|
||||
}
|
||||
});
|
||||
return highestSiblingIndex;
|
||||
}
|
||||
|
||||
public static fadeTo(target: Node, duration: number, opacity: number, options?: ITweenOption, callback?: Function): Tween<object> {
|
||||
let uiOpacity = target.getComponent(UIOpacity)!;
|
||||
if (uiOpacity === null) uiOpacity = target.addComponent(UIOpacity);
|
||||
let spine: sp.Skeleton = target.getComponent(sp.Skeleton)!;
|
||||
options = options || {};
|
||||
if (spine) {
|
||||
if (options.onUpdate) {
|
||||
let _onUpdate = options.onUpdate;
|
||||
options.onUpdate = function () {
|
||||
UmUtil.setAlphaSpine(spine, uiOpacity.opacity);
|
||||
_onUpdate && _onUpdate();
|
||||
}
|
||||
}
|
||||
else {
|
||||
options.onUpdate = function () {
|
||||
UmUtil.setAlphaSpine(spine, uiOpacity.opacity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let tweenFade = tween(uiOpacity);
|
||||
tweenFade.to(duration, { opacity }, options).start();
|
||||
(target as any).tweenFade = tweenFade;
|
||||
return tweenFade;
|
||||
}
|
||||
|
||||
public static fadeIn(target: Node, duration: number, options?: ITweenOption): Tween<Node> {
|
||||
return UmUtil.fadeTo(target, duration, 255, options);
|
||||
}
|
||||
|
||||
public static fadeOut(target: Node, duration: number, options?: ITweenOption): Tween<Node> {
|
||||
return UmUtil.fadeTo(target, duration, 0, options);
|
||||
}
|
||||
|
||||
public static uuid() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
public static getWindowSize(): cc.Size {
|
||||
return cc.screen.windowSize;
|
||||
}
|
||||
|
||||
public static getCanvasSize(): cc.Size {
|
||||
const viewSize = cc.screen.windowSize;
|
||||
const designSize = cc.view.getDesignResolutionSize();
|
||||
let windowWidth = viewSize.width;
|
||||
let windowHeight = viewSize.height;
|
||||
let windowRatio = windowWidth * 1.0 / windowHeight;
|
||||
const designRatio = designSize.width * 1.0 / designSize.height;
|
||||
|
||||
let height = designSize.height;
|
||||
if (windowRatio <= designRatio) {
|
||||
// let cHeight = Math.floor(designSize.width / windowRatio);
|
||||
height = designSize.width / viewSize.width * viewSize.height;
|
||||
}
|
||||
cc.log("getCanvasSize ==> ", designSize.width, height);
|
||||
return new cc.Size(designSize.width, height);
|
||||
}
|
||||
|
||||
public static multiplicationExact(numb1: number, numb2: number) {
|
||||
let digit1 = Number(numb1.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit1)) digit1 = 0;
|
||||
|
||||
let digit2 = Number(numb2.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit2)) digit2 = 0;
|
||||
|
||||
let maxDigit = digit1 + digit2;
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let factor = Math.pow(10, i);
|
||||
let result = ((numb1 / factor) * (numb2 / factor)) * factor * factor;
|
||||
let digit_check = Number(result.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit_check) || Number(digit_check) <= maxDigit) {
|
||||
// cc.log(" multipl1 ===> digit = ", digit_check, " | pow = 10^", i);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let factor = Math.pow(10, i);
|
||||
let result = ((numb1 / factor) * (numb2 / factor)) * Math.pow(factor, 2);
|
||||
let digit_check = Number(result.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit_check) || Number(digit_check) <= maxDigit) {
|
||||
// cc.log(" multipl2 ===> digit_check = ", digit_check, " | pow = 10^", i);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// cc.log("RESULT ==> ", result);
|
||||
return numb1 * numb2;
|
||||
}
|
||||
|
||||
public static setLabelSubStringByMaxWidth(label: cc.Label, maxWidth: number) {
|
||||
label.updateRenderData();
|
||||
let transform = label.getComponent(UITransform)!;
|
||||
|
||||
if (transform.width > maxWidth) {
|
||||
while (transform.width > maxWidth) {
|
||||
label.string = label.string.slice(0, -1);
|
||||
label.updateRenderData();
|
||||
}
|
||||
label.string += "...";
|
||||
}
|
||||
}
|
||||
|
||||
public static PlusExact(numb1: number, numb2: number) {
|
||||
let digit1 = Number(numb1.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit1)) digit1 = 0;
|
||||
|
||||
let digit2 = Number(numb2.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit2)) digit2 = 0;
|
||||
|
||||
let maxDigit = Math.max(digit1, digit2);
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let factor = Math.pow(10, i);
|
||||
let result = ((numb1 / factor) + (numb2 / factor)) * factor * factor;
|
||||
let digit_check = Number(result.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit_check) || Number(digit_check) <= maxDigit) {
|
||||
// cc.log(" multipl1 ===> digit = ", digit_check, " | pow = 10^", i);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let factor = Math.pow(10, i);
|
||||
let result = ((numb1 / factor) + (numb2 / factor)) * Math.pow(factor, 2);
|
||||
let digit_check = Number(result.toString().split('.')[1]?.length);
|
||||
if (Number.isNaN(digit_check) || Number(digit_check) <= maxDigit) {
|
||||
// cc.log(" multipl2 ===> digit_check = ", digit_check, " | pow = 10^", i);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// cc.log("RESULT ==> ", result);
|
||||
return numb1 + numb2;
|
||||
}
|
||||
|
||||
public static setAlphaSpine(spine: sp.Skeleton, alpha: number) {
|
||||
let color: Color = Color.clone(spine.color);
|
||||
color.a = alpha;
|
||||
spine.color = color;
|
||||
}
|
||||
|
||||
public static moveTo(obj: Node, pointTo: Vec3, duration: number, delayTime?: number, callback?: Function, tag = UmUtil.TWEEN_TAG) {
|
||||
if (!obj) return;
|
||||
tween(obj).delay(delayTime).to(duration, { position: pointTo }).call(() => callback?.()).tag(tag).start();
|
||||
}
|
||||
|
||||
public static worldMoveTo(obj: Node, worldPointTo: Vec3, duration: number, delayTime?: number, callback?: Function, tag = UmUtil.TWEEN_TAG) {
|
||||
if (!obj) return;
|
||||
tween(obj).delay(delayTime).to(duration, { worldPosition: worldPointTo }).call(() => callback?.()).tag(tag).start();
|
||||
}
|
||||
|
||||
public static scaleTo(obj: Node, scaleTo: Vec3, duration: number, delayTime?: number, callback?: Function, tag = UmUtil.TWEEN_TAG) {
|
||||
if (!obj) return;
|
||||
tween(obj).delay(delayTime).to(duration, { scale: scaleTo }).call(() => callback?.()).tag(tag).start();
|
||||
}
|
||||
|
||||
public static delay(obj: Node, delayTime: number, callback: Function, tag = UmUtil.TWEEN_TAG) {
|
||||
tween(obj).delay(delayTime).call(() => {
|
||||
if (obj?.active) {
|
||||
callback?.();
|
||||
}
|
||||
}).tag(tag).start();
|
||||
}
|
||||
|
||||
public static rotateBy(obj: Node, angle: number, duration: number, delayTime?: number, callback?: Function, tag = UmUtil.TWEEN_TAG) {
|
||||
if (!obj) return;
|
||||
tween(obj).delay(delayTime).by(duration, { angle: angle }).call(() => callback?.()).tag(tag).start();
|
||||
}
|
||||
|
||||
public static tweenValue(from, to, duration, updateCallback = null, completeCallback = null)
|
||||
{
|
||||
const _target = { value: from };
|
||||
var tweenValue = tween(_target)
|
||||
.to(duration, { value: to }, {
|
||||
'onStart': () => {
|
||||
|
||||
},
|
||||
'onUpdate': () => {
|
||||
updateCallback?.(_target.value);
|
||||
},
|
||||
'onComplete': () => {
|
||||
completeCallback?.();
|
||||
}
|
||||
});
|
||||
|
||||
tweenValue.start();
|
||||
return tweenValue;
|
||||
}
|
||||
|
||||
public static TWEEN_TAG = 2003;
|
||||
|
||||
public static stopAllTweenTarget(obj: Node)
|
||||
{
|
||||
Tween.stopAllByTarget(obj);
|
||||
}
|
||||
|
||||
public static stopAllTweenTag(tag: number) {
|
||||
Tween.stopAllByTag(tag);
|
||||
}
|
||||
|
||||
public static plusTwoVector3(a: Vec3, b: Vec3)
|
||||
{
|
||||
var result = new Vec3();
|
||||
Vec3.add(result, a, b);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static subtractTwoVector3(a: Vec3, b: Vec3) {
|
||||
var result = new Vec3();
|
||||
Vec3.subtract(result, a, b);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static scaleVector3(a: Vec3, b: number) {
|
||||
return new Vec3(a.x * b, a.y * b, a.z * b);
|
||||
}
|
||||
|
||||
// public static subtractTwoVector3(a: Vec3, b: Vec3) {
|
||||
// var result = new Vec3();
|
||||
// Vec3.subtract(result, a, b);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "a1649dba-2b39-4bc6-bba8-ce0f44c03741",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "dcb35788-4cf3-4fcf-ac26-1703585b43b1",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "c2b242bc-18c8-4663-b7b3-6df51641ff05",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
import { _decorator, Component, Node } from 'cc';
|
||||
import { NodeBase } from '../scripts/base/NodeBase';
|
||||
import { Vec3, EventTouch } from 'cc';
|
||||
import { UmUtil } from '../../cc-common/cc-util/UmUtil';
|
||||
import { GameGlobalData } from '../scripts/global/GameGlobalData';
|
||||
import { UmLog } from '../../cc-common/cc-util/UmLog';
|
||||
import { UmClientEvent } from '../../cc-common/cc-util/UmOneToMultiListener';
|
||||
import { GameDefine } from '../scripts/config/GameDefine';
|
||||
import { director } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('JoyStick')
|
||||
export class JoyStick extends NodeBase {
|
||||
@property(Node) background: Node = null!;
|
||||
@property(Node) handle: Node = null!;
|
||||
|
||||
radiusDistance: number;
|
||||
public static IS_TOUCH_ENABLE: boolean = false;
|
||||
public static DIRECTION: Vec3 = new Vec3();
|
||||
public static Instance: JoyStick = null;
|
||||
|
||||
startBgPoint: Vec3 = Vec3.ZERO;
|
||||
|
||||
protected onLoad(): void {
|
||||
JoyStick.Instance = this;
|
||||
}
|
||||
|
||||
start() {
|
||||
this.startBgPoint = new Vec3(this.background.position);
|
||||
this.enableTouch();
|
||||
this.radiusDistance = (this.background.getNodeTransform().width) / 2;//differentPoint
|
||||
}
|
||||
|
||||
showJoystick()
|
||||
{
|
||||
this.background.setNodeActive(true);
|
||||
}
|
||||
|
||||
hideJoySitck()
|
||||
{
|
||||
this.background.setNodeActive(false);
|
||||
}
|
||||
|
||||
resetBgPosition()
|
||||
{
|
||||
this.background.position = new Vec3(this.startBgPoint);
|
||||
}
|
||||
|
||||
protected onTouchStart(event: EventTouch) {
|
||||
if (!GameGlobalData.Instance.isStatePlay()) return;
|
||||
JoyStick.IS_TOUCH_ENABLE = true;
|
||||
var touchPoint = this.getTouchPointInParentNode(event.getUILocation());
|
||||
this.background.position = new Vec3(touchPoint);
|
||||
|
||||
// {
|
||||
// //OLD version
|
||||
// // this.startPoint = new Vec3(this.node.position);
|
||||
// // let newPoint = this.getTouchPointInParentNode(event.getUILocation());
|
||||
// // let direction = UmUtil.subtractTwoVector3(newPoint, this.originPoint);
|
||||
// // this.setHandlePosition(newPoint, new Vec3(direction));
|
||||
// // UmClientEvent.dispatchEvent(GameDefine.EVENT_START_JOYSTICK);
|
||||
// }
|
||||
}
|
||||
|
||||
protected onTouchMove(event: EventTouch) {
|
||||
if (!GameGlobalData.Instance.isStatePlay() || !JoyStick.IS_TOUCH_ENABLE) return;
|
||||
var movePoint = this.getTouchPointInParentNode(event.getUILocation());
|
||||
// this.handle.worldPosition = this.node?.parent.getNodeTransform().convertToWorldSpaceAR(movePoint);
|
||||
|
||||
var currentBgPoint = new Vec3(this.background.worldPosition);
|
||||
var newHandlePoint = this.node?.parent.getNodeTransform().convertToWorldSpaceAR(movePoint);//new Vec3(this.handle.worldPosition);
|
||||
var direction: Vec3 = UmUtil.subtractTwoVector3(newHandlePoint, currentBgPoint).normalize();
|
||||
if (Vec3.distance(newHandlePoint, currentBgPoint) > this.radiusDistance)
|
||||
{
|
||||
var differentPoint = UmUtil.scaleVector3(direction, this.radiusDistance);
|
||||
this.background.worldPosition = UmUtil.subtractTwoVector3(newHandlePoint, differentPoint);
|
||||
}
|
||||
|
||||
this.handle.worldPosition = newHandlePoint;
|
||||
JoyStick.IS_TOUCH_ENABLE = true;
|
||||
JoyStick.DIRECTION = direction;
|
||||
GameGlobalData.Instance.lastHeroMoveDirection = direction;
|
||||
|
||||
// {
|
||||
// //OLD version
|
||||
// // let newPoint = this.getTouchPointInParentNode(event.getUILocation());
|
||||
// // let direction = UmUtil.subtractTwoVector3(newPoint, this.originPoint);
|
||||
// // direction.normalize();
|
||||
// // // direction = UmUtil.scaleVector3(direction, this.heroMoveSpeed);
|
||||
// // JoyStick.IS_TOUCH_ENABLE = true;
|
||||
// // JoyStick.DIRECTION = direction;
|
||||
// // GameGlobalData.Instance.lastHeroMoveDirection = direction;
|
||||
// // // UmLog.log(newPoint.toString());
|
||||
// // // this.currentPoint = new Vec3(newPoint);
|
||||
// // this.setHandlePosition(newPoint, new Vec3(direction));
|
||||
// }
|
||||
}
|
||||
|
||||
protected onTouchEnd(event: EventTouch) {
|
||||
JoyStick.IS_TOUCH_ENABLE = false;
|
||||
JoyStick.DIRECTION = Vec3.ZERO;
|
||||
this.handle.position = Vec3.ZERO;
|
||||
this.resetBgPosition();
|
||||
UmClientEvent.dispatchEvent(GameDefine.EVENT_END_JOYSTICK);
|
||||
}
|
||||
|
||||
protected onTouchCancel(event: EventTouch) {
|
||||
JoyStick.IS_TOUCH_ENABLE = false;
|
||||
JoyStick.DIRECTION = Vec3.ZERO;
|
||||
this.handle.position = Vec3.ZERO;
|
||||
this.resetBgPosition();
|
||||
UmClientEvent.dispatchEvent(GameDefine.EVENT_END_JOYSTICK);
|
||||
}
|
||||
|
||||
getTouchPointInParentNode(touchPoint): Vec3 {
|
||||
return this.node.parent?.getNodeTransform().convertToNodeSpaceAR(touchPoint.toVec3());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0e282282-101a-4cf2-a672-3ac6fc718270",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
import { _decorator, CCInteger, Collider2D, Component, Contact2DType, EventTouch, IPhysics2DContact, log, Node, PhysicsSystem2D, Sprite, Vec3 } from 'cc';
|
||||
import { RigidBody2D } from 'cc';
|
||||
import { NodeBase } from '../scripts/base/NodeBase';
|
||||
import { EPhysics2DDrawFlags } from 'cc';
|
||||
import { director } from 'cc';
|
||||
import { UmUtil } from '../../cc-common/cc-util/UmUtil';
|
||||
import { Vec2 } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PhysicTest')
|
||||
export class PhysicTest extends NodeBase {
|
||||
@property(Sprite)
|
||||
sprite: Sprite = null!;
|
||||
|
||||
@property(CCInteger)
|
||||
deltaX: number = 0;
|
||||
|
||||
rigiBody: RigidBody2D;
|
||||
|
||||
start() {
|
||||
this.rigiBody = this.node.getComponent(RigidBody2D);
|
||||
// Registering callback functions for a single collider
|
||||
let collider = this.getComponent(Collider2D);
|
||||
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Shape;
|
||||
|
||||
if (collider) {
|
||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
collider.on(Contact2DType.END_CONTACT, this.onEndContact, this);
|
||||
// collider.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this);
|
||||
// collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||
}
|
||||
|
||||
this.enableTouch();
|
||||
|
||||
UmUtil.delay(this.node, 2, () => {
|
||||
this.rigiBody.applyLinearImpulseToCenter(new Vec2(0, 75), false);
|
||||
});
|
||||
|
||||
// Registering global contact callback functions
|
||||
// if (PhysicsSystem2D.instance) {
|
||||
// PhysicsSystem2D.instance.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
// PhysicsSystem2D.instance.on(Contact2DType.END_CONTACT, this.onEndContact, this);
|
||||
// PhysicsSystem2D.instance.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this);
|
||||
// PhysicsSystem2D.instance.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||
// }
|
||||
}
|
||||
onBeginContact(selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
// will be called once when two colliders begin to contact
|
||||
console.log('onBeginContact');
|
||||
// director.loadScene("Test");
|
||||
// selfCollider.node.destroy();
|
||||
}
|
||||
onEndContact(selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
// will be called once when the contact between two colliders just about to end.
|
||||
console.log('onEndContact');
|
||||
}
|
||||
onPreSolve(selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
// will be called every time collider contact should be resolved
|
||||
console.log('onPreSolve');
|
||||
}
|
||||
onPostSolve(selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
// will be called every time collider contact should be resolved
|
||||
console.log('onPostSolve');
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
// log('test');
|
||||
if (!this.isTouchEnable) return;
|
||||
// this.node.position = UmUtil.plusTwoVector3(this.node.position, this.directionVec3);
|
||||
// this.rigiBody.applyForceToCenter(new Vec2(10, 40), true);
|
||||
|
||||
}
|
||||
|
||||
directionVec3: Vec3 = Vec3.ZERO;
|
||||
isTouchEnable = true;
|
||||
|
||||
|
||||
currentPoint: Vec3 = Vec3.ZERO;
|
||||
protected onTouchStart(event: EventTouch) {
|
||||
this.currentPoint = new Vec3(this.node.position);
|
||||
// let point = this.getTouchPointInParentNode(event.getUILocation());
|
||||
}
|
||||
|
||||
|
||||
protected onTouchEnd(event: EventTouch) { }
|
||||
|
||||
protected onTouchCancel(event: EventTouch) { }
|
||||
protected onTouchMove(event: EventTouch) {
|
||||
let newPoint = this.getTouchPointInParentNode(event.getUILocation());
|
||||
this.node.position = newPoint;
|
||||
// let direction = UmUtil.subtractTwoVector3(newPoint, this.currentPoint);
|
||||
// direction.normalize();
|
||||
// direction = UmUtil.scaleVector3(direction, 30);
|
||||
// this.node.position = UmUtil.plusTwoVector3(this.currentPoint, direction);
|
||||
// this.currentPoint = this.node.position;
|
||||
// // this.rigiBody.
|
||||
// // UmLog.log(`onTouchMove: ${event.getLocation()}`);
|
||||
// // this.node.worldPosition = event.getLocation().toVec3();
|
||||
}
|
||||
|
||||
getTouchPointInParentNode(touchPoint): Vec3 {
|
||||
return this.node.parent?.getNodeTransform().convertToNodeSpaceAR(touchPoint.toVec3());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "34887606-9d45-43d5-846b-643ada88d926",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "scene",
|
||||
"imported": true,
|
||||
"uuid": "641dfdac-ab3c-4690-8fd1-b6de7d248493",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "7642a20b-c7b1-4661-ba00-bcc7626ef83a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "543784a7-a87a-4ce1-a1f1-f3472572493c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "e463c184-b6d0-44bd-ad17-a687b7e57066",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "a0cb3965-00e9-44f3-b874-546ed7eb2a97",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,200 @@
|
|||
[
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "idle",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {
|
||||
"embeddedPlayerGroups": []
|
||||
},
|
||||
"_native": "",
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"enableTrsBlending": false,
|
||||
"_duration": 0.7833333333333333,
|
||||
"_hash": 500763545,
|
||||
"_tracks": [
|
||||
{
|
||||
"__id__": 1
|
||||
}
|
||||
],
|
||||
"_exoticAnimation": null,
|
||||
"_events": [],
|
||||
"_embeddedPlayers": [],
|
||||
"_additiveSettings": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_auxiliaryCurveEntries": []
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.ObjectTrack",
|
||||
"_binding": {
|
||||
"__type__": "cc.animation.TrackBinding",
|
||||
"path": {
|
||||
"__id__": 2
|
||||
},
|
||||
"proxy": null
|
||||
},
|
||||
"_channel": {
|
||||
"__id__": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.TrackPath",
|
||||
"_paths": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
"spriteFrame"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.HierarchyPath",
|
||||
"path": "hero_body"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.ComponentPath",
|
||||
"component": "cc.Sprite"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ObjectCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.03333333333333333,
|
||||
0.06666666666666667,
|
||||
0.1,
|
||||
0.13333333333333333,
|
||||
0.16666666666666666,
|
||||
0.2,
|
||||
0.23333333333333334,
|
||||
0.26666666666666666,
|
||||
0.3,
|
||||
0.3333333333333333,
|
||||
0.36666666666666664,
|
||||
0.4,
|
||||
0.43333333333333335,
|
||||
0.4666666666666667,
|
||||
0.5,
|
||||
0.5333333333333333,
|
||||
0.5666666666666667,
|
||||
0.6,
|
||||
0.6333333333333333,
|
||||
0.6666666666666666,
|
||||
0.7,
|
||||
0.7333333333333333,
|
||||
0.7666666666666667
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__uuid__": "d39143f4-9cb1-4456-bbc9-a17e95f94c1c@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "001673db-d964-4fe1-8877-29e38c07ec07@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "b5bb6063-75e6-4051-81f4-2fe3c2d9c76b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "6ed0bd6e-8492-4424-a282-d4ea0886e6b8@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "6425708c-d048-4e55-bfc7-e55e64137b85@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "6d3ce880-bbc3-427b-ae61-a15f4bad51f5@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "72820076-c6d7-46f8-abc4-37695c46b74e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "5b74a743-cede-40ad-9ef5-1a74ce0762f1@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "5e71c658-2487-4a72-8b9e-323c1129e6c4@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "542e184d-9549-4e02-9917-4b4ccc57451c@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "5821f47a-fd7f-4018-8749-4708d74567c3@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "bd9a24cf-668c-40f9-84f4-f21e64f5be4c@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "50a5bb52-d102-4b6b-9a3e-f10725bb842f@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "6abcccab-5925-449f-8ae7-0032b40acfaf@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "8904192e-3b76-47c6-aab2-7299e1097c2f@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "9ba49132-f142-46f6-87bc-6cd642fc930b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "17a8ff9e-0e0d-459d-bca5-66e6c32a07d2@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "61143473-e57c-4be1-9d05-4dedb7c9be1d@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "b564b9ac-2f0e-4fef-9734-cd0b229f8397@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "518e3eac-def4-44c5-b820-f38707338b3b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "7ab8b177-bf41-4090-8f76-a7fec2cb2f4f@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "4a4019d8-5e2f-43ed-9819-9db24090eaf1@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "8bee5815-8414-4d1e-ba90-53af2894ad2b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "45441e11-af45-49aa-aa1b-7e63c4921d70@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.AnimationClipAdditiveSettings",
|
||||
"enabled": false,
|
||||
"refClip": null
|
||||
}
|
||||
]
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "2.0.3",
|
||||
"importer": "animation-clip",
|
||||
"imported": true,
|
||||
"uuid": "6dd70c1b-d1ca-4169-823d-562b6c968e64",
|
||||
"files": [
|
||||
".cconb"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"name": "idle"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "aa8d0da4-b3ca-4983-a8db-8dbd882d91fc",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "d39143f4-9cb1-4456-bbc9-a17e95f94c1c",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "d39143f4-9cb1-4456-bbc9-a17e95f94c1c@6c48a",
|
||||
"displayName": "template character-idle_00",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "d39143f4-9cb1-4456-bbc9-a17e95f94c1c",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "d39143f4-9cb1-4456-bbc9-a17e95f94c1c@f9941",
|
||||
"displayName": "template character-idle_00",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "d39143f4-9cb1-4456-bbc9-a17e95f94c1c@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "d39143f4-9cb1-4456-bbc9-a17e95f94c1c@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "001673db-d964-4fe1-8877-29e38c07ec07",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "001673db-d964-4fe1-8877-29e38c07ec07@6c48a",
|
||||
"displayName": "template character-idle_01",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "001673db-d964-4fe1-8877-29e38c07ec07",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "001673db-d964-4fe1-8877-29e38c07ec07@f9941",
|
||||
"displayName": "template character-idle_01",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "001673db-d964-4fe1-8877-29e38c07ec07@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "001673db-d964-4fe1-8877-29e38c07ec07@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "b5bb6063-75e6-4051-81f4-2fe3c2d9c76b",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "b5bb6063-75e6-4051-81f4-2fe3c2d9c76b@6c48a",
|
||||
"displayName": "template character-idle_02",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "b5bb6063-75e6-4051-81f4-2fe3c2d9c76b",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "b5bb6063-75e6-4051-81f4-2fe3c2d9c76b@f9941",
|
||||
"displayName": "template character-idle_02",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "b5bb6063-75e6-4051-81f4-2fe3c2d9c76b@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "b5bb6063-75e6-4051-81f4-2fe3c2d9c76b@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "6ed0bd6e-8492-4424-a282-d4ea0886e6b8",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "6ed0bd6e-8492-4424-a282-d4ea0886e6b8@6c48a",
|
||||
"displayName": "template character-idle_03",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6ed0bd6e-8492-4424-a282-d4ea0886e6b8",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "6ed0bd6e-8492-4424-a282-d4ea0886e6b8@f9941",
|
||||
"displayName": "template character-idle_03",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6ed0bd6e-8492-4424-a282-d4ea0886e6b8@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "6ed0bd6e-8492-4424-a282-d4ea0886e6b8@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "6425708c-d048-4e55-bfc7-e55e64137b85",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "6425708c-d048-4e55-bfc7-e55e64137b85@6c48a",
|
||||
"displayName": "template character-idle_04",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6425708c-d048-4e55-bfc7-e55e64137b85",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "6425708c-d048-4e55-bfc7-e55e64137b85@f9941",
|
||||
"displayName": "template character-idle_04",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6425708c-d048-4e55-bfc7-e55e64137b85@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "6425708c-d048-4e55-bfc7-e55e64137b85@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "6d3ce880-bbc3-427b-ae61-a15f4bad51f5",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "6d3ce880-bbc3-427b-ae61-a15f4bad51f5@6c48a",
|
||||
"displayName": "template character-idle_05",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6d3ce880-bbc3-427b-ae61-a15f4bad51f5",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "6d3ce880-bbc3-427b-ae61-a15f4bad51f5@f9941",
|
||||
"displayName": "template character-idle_05",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6d3ce880-bbc3-427b-ae61-a15f4bad51f5@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "6d3ce880-bbc3-427b-ae61-a15f4bad51f5@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "72820076-c6d7-46f8-abc4-37695c46b74e",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "72820076-c6d7-46f8-abc4-37695c46b74e@6c48a",
|
||||
"displayName": "template character-idle_06",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "72820076-c6d7-46f8-abc4-37695c46b74e",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "72820076-c6d7-46f8-abc4-37695c46b74e@f9941",
|
||||
"displayName": "template character-idle_06",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "72820076-c6d7-46f8-abc4-37695c46b74e@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "72820076-c6d7-46f8-abc4-37695c46b74e@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "5b74a743-cede-40ad-9ef5-1a74ce0762f1",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "5b74a743-cede-40ad-9ef5-1a74ce0762f1@6c48a",
|
||||
"displayName": "template character-idle_07",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5b74a743-cede-40ad-9ef5-1a74ce0762f1",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "5b74a743-cede-40ad-9ef5-1a74ce0762f1@f9941",
|
||||
"displayName": "template character-idle_07",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5b74a743-cede-40ad-9ef5-1a74ce0762f1@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "5b74a743-cede-40ad-9ef5-1a74ce0762f1@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "5e71c658-2487-4a72-8b9e-323c1129e6c4",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "5e71c658-2487-4a72-8b9e-323c1129e6c4@6c48a",
|
||||
"displayName": "template character-idle_08",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5e71c658-2487-4a72-8b9e-323c1129e6c4",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "5e71c658-2487-4a72-8b9e-323c1129e6c4@f9941",
|
||||
"displayName": "template character-idle_08",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5e71c658-2487-4a72-8b9e-323c1129e6c4@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "5e71c658-2487-4a72-8b9e-323c1129e6c4@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "542e184d-9549-4e02-9917-4b4ccc57451c",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "542e184d-9549-4e02-9917-4b4ccc57451c@6c48a",
|
||||
"displayName": "template character-idle_09",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "542e184d-9549-4e02-9917-4b4ccc57451c",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "542e184d-9549-4e02-9917-4b4ccc57451c@f9941",
|
||||
"displayName": "template character-idle_09",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "542e184d-9549-4e02-9917-4b4ccc57451c@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "542e184d-9549-4e02-9917-4b4ccc57451c@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "5821f47a-fd7f-4018-8749-4708d74567c3",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "5821f47a-fd7f-4018-8749-4708d74567c3@6c48a",
|
||||
"displayName": "template character-idle_10",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5821f47a-fd7f-4018-8749-4708d74567c3",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "5821f47a-fd7f-4018-8749-4708d74567c3@f9941",
|
||||
"displayName": "template character-idle_10",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5821f47a-fd7f-4018-8749-4708d74567c3@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "5821f47a-fd7f-4018-8749-4708d74567c3@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "bd9a24cf-668c-40f9-84f4-f21e64f5be4c",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "bd9a24cf-668c-40f9-84f4-f21e64f5be4c@6c48a",
|
||||
"displayName": "template character-idle_11",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "bd9a24cf-668c-40f9-84f4-f21e64f5be4c",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "bd9a24cf-668c-40f9-84f4-f21e64f5be4c@f9941",
|
||||
"displayName": "template character-idle_11",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "bd9a24cf-668c-40f9-84f4-f21e64f5be4c@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "bd9a24cf-668c-40f9-84f4-f21e64f5be4c@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "50a5bb52-d102-4b6b-9a3e-f10725bb842f",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "50a5bb52-d102-4b6b-9a3e-f10725bb842f@6c48a",
|
||||
"displayName": "template character-idle_12",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "50a5bb52-d102-4b6b-9a3e-f10725bb842f",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "50a5bb52-d102-4b6b-9a3e-f10725bb842f@f9941",
|
||||
"displayName": "template character-idle_12",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "50a5bb52-d102-4b6b-9a3e-f10725bb842f@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "50a5bb52-d102-4b6b-9a3e-f10725bb842f@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "6abcccab-5925-449f-8ae7-0032b40acfaf",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "6abcccab-5925-449f-8ae7-0032b40acfaf@6c48a",
|
||||
"displayName": "template character-idle_13",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6abcccab-5925-449f-8ae7-0032b40acfaf",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "6abcccab-5925-449f-8ae7-0032b40acfaf@f9941",
|
||||
"displayName": "template character-idle_13",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "6abcccab-5925-449f-8ae7-0032b40acfaf@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "6abcccab-5925-449f-8ae7-0032b40acfaf@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "8904192e-3b76-47c6-aab2-7299e1097c2f",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "8904192e-3b76-47c6-aab2-7299e1097c2f@6c48a",
|
||||
"displayName": "template character-idle_14",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "8904192e-3b76-47c6-aab2-7299e1097c2f",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "8904192e-3b76-47c6-aab2-7299e1097c2f@f9941",
|
||||
"displayName": "template character-idle_14",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "8904192e-3b76-47c6-aab2-7299e1097c2f@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "8904192e-3b76-47c6-aab2-7299e1097c2f@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "9ba49132-f142-46f6-87bc-6cd642fc930b",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "9ba49132-f142-46f6-87bc-6cd642fc930b@6c48a",
|
||||
"displayName": "template character-idle_15",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "9ba49132-f142-46f6-87bc-6cd642fc930b",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "9ba49132-f142-46f6-87bc-6cd642fc930b@f9941",
|
||||
"displayName": "template character-idle_15",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "9ba49132-f142-46f6-87bc-6cd642fc930b@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "9ba49132-f142-46f6-87bc-6cd642fc930b@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "17a8ff9e-0e0d-459d-bca5-66e6c32a07d2",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "17a8ff9e-0e0d-459d-bca5-66e6c32a07d2@6c48a",
|
||||
"displayName": "template character-idle_16",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "17a8ff9e-0e0d-459d-bca5-66e6c32a07d2",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "17a8ff9e-0e0d-459d-bca5-66e6c32a07d2@f9941",
|
||||
"displayName": "template character-idle_16",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "17a8ff9e-0e0d-459d-bca5-66e6c32a07d2@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "17a8ff9e-0e0d-459d-bca5-66e6c32a07d2@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "61143473-e57c-4be1-9d05-4dedb7c9be1d",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "61143473-e57c-4be1-9d05-4dedb7c9be1d@6c48a",
|
||||
"displayName": "template character-idle_17",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "61143473-e57c-4be1-9d05-4dedb7c9be1d",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "61143473-e57c-4be1-9d05-4dedb7c9be1d@f9941",
|
||||
"displayName": "template character-idle_17",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 351,
|
||||
"height": 502,
|
||||
"rawWidth": 351,
|
||||
"rawHeight": 502,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-175.5,
|
||||
-251,
|
||||
0,
|
||||
175.5,
|
||||
-251,
|
||||
0,
|
||||
-175.5,
|
||||
251,
|
||||
0,
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
502,
|
||||
351,
|
||||
502,
|
||||
0,
|
||||
0,
|
||||
351,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-175.5,
|
||||
-251,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
175.5,
|
||||
251,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "61143473-e57c-4be1-9d05-4dedb7c9be1d@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "61143473-e57c-4be1-9d05-4dedb7c9be1d@f9941"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |