This commit is contained in:
sli97 2022-11-27 23:23:47 +08:00
commit 1a27f478d0
219 changed files with 15759 additions and 0 deletions

160
.gitignore vendored Normal file
View File

@ -0,0 +1,160 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
.DS_Store
package-lock.json
#/////////////////////////////////////////////////////////////////////////////
# Fireball Projects
#/////////////////////////////////////////////////////////////////////////////
/library/
/temp/
/local/
/build/
#/////////////////////////////////////////////////////////////////////////////
# npm files
#/////////////////////////////////////////////////////////////////////////////
npm-debug.log
node_modules/
#/////////////////////////////////////////////////////////////////////////////
# Logs and databases
#/////////////////////////////////////////////////////////////////////////////
*.log
*.sql
*.sqlite
#/////////////////////////////////////////////////////////////////////////////
# files for debugger
#/////////////////////////////////////////////////////////////////////////////
*.sln
*.pidb
*.suo
#/////////////////////////////////////////////////////////////////////////////
# OS generated files
#/////////////////////////////////////////////////////////////////////////////
.DS_Store
ehthumbs.db
Thumbs.db
#/////////////////////////////////////////////////////////////////////////////
# WebStorm files
#/////////////////////////////////////////////////////////////////////////////
.idea/
#//////////////////////////
# VS Code files
#//////////////////////////
.vscode/

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# 实时对战
# IO
# 帧同步
# Cocos Creator
# Node.js

View File

@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template

View File

@ -0,0 +1,5 @@
{
"image": {
"type": "sprite-frame"
}
}

11
client/.eslintrc Normal file
View File

@ -0,0 +1,11 @@
{
"extends": "@antfu",
"rules": {
"curly": "off",
"no-console": "off",
"no-cond-assign": "off",
"no-useless-call": "off",
"@typescript-eslint/brace-style": "off",
"@typescript-eslint/consistent-type-imports": "off"
}
}

24
client/.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
#///////////////////////////
# Cocos Creator 3D Project
#///////////////////////////
library/
temp/
local/
build/
profiles/
native
#//////////////////////////
# NPM
#//////////////////////////
node_modules/
#//////////////////////////
# VSCode
#//////////////////////////
# .vscode/
#//////////////////////////
# WebStorm
#//////////////////////////
.idea/

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "2d541e68-a3ab-45a5-a30d-ffc21e6aa37f",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

12
client/assets/Scenes.meta Normal file
View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "e4b93ee1-f734-42e9-8468-c45a928b7b58",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
{
"ver": "1.1.39",
"importer": "scene",
"imported": true,
"uuid": "c6ff3dfa-c3a9-4c47-abc2-690531911090",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "a5ff1131-2769-49ad-92d3-4d7f4b7c2b24",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "b9842cc1-d805-42af-b6b9-b15d5dd32f65",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,23 @@
import { _decorator, Component, Node, Layers, UITransform, Sprite, KeyCode, Vec2, RigidBody2D, BoxCollider2D, Size, ERigidBody2DType } from 'cc';
import { EntityEnum, EntityStateEnum } from '../Enum';
import StateMachine from './StateMachine';
const { ccclass, property } = _decorator;
@ccclass('EntityManager')
export abstract class EntityManager extends Component {
fsm: StateMachine
private _state: EntityStateEnum
get state() {
return this._state
}
set state(newState) {
this._state = newState
this.fsm.setParams(newState, true)
}
abstract init(...args: any[]): void
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "2e4eed53-d1b9-42ef-97aa-8d0a8da927f7",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,17 @@
/***
*
*/
export default class Singleton {
private static _instance: any = null
static GetInstance<T>(): T {
if (this._instance === null) {
this._instance = new this()
}
return this._instance
}
protected constructor() {
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "0ee5b84a-8971-410f-a39d-2cf96597dd45",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,48 @@
import { animation, AnimationClip, Sprite, SpriteFrame } from 'cc'
import DataManager from '../Global/DataManager'
import { ResourceManager } from '../Global/ResourceManager'
import { sortSpriteFrame } from '../Utils'
import StateMachine from './StateMachine'
/***
* unit:milisecond
*/
export const ANIMATION_SPEED = 1 / 10
/***
* SpriteAnimation组件执行播放
*/
export default class State {
private animationClip: AnimationClip
constructor(
private fsm: StateMachine,
private path: string,
private wrapMode: AnimationClip.WrapMode = AnimationClip.WrapMode.Normal,
private force: boolean = false,
) {
//生成动画轨道属性
const track = new animation.ObjectTrack()
track.path = new animation.TrackPath().toComponent(Sprite).toProperty('spriteFrame')
const spriteFrames = DataManager.Instance.textureMap.get(this.path)
const frames: Array<[number, SpriteFrame]> = sortSpriteFrame(spriteFrames).map((item, index) => [
index * ANIMATION_SPEED,
item,
])
track.channel.curve.assignSorted(frames)
//动画添加轨道
this.animationClip = new AnimationClip()
this.animationClip.name = this.path
this.animationClip.duration = frames.length * ANIMATION_SPEED
this.animationClip.addTrack(track)
this.animationClip.wrapMode = this.wrapMode
}
run() {
if (this.fsm.animationComponent.defaultClip?.name === this.animationClip.name && !this.force) {
return
}
this.fsm.animationComponent.defaultClip = this.animationClip
this.fsm.animationComponent.play()
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "226c1921-1459-4764-82e6-b1a11c5a73c2",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,90 @@
import { _decorator, Animation, Component, SpriteFrame } from 'cc'
import { FsmParamTypeEnum } from '../Enum'
const { ccclass } = _decorator
import State from './State'
import SubStateMachine from './SubStateMachine'
type ParamsValueType = boolean | number
export interface IParamsValue {
type: FsmParamTypeEnum
value: ParamsValueType
}
export const getInitParamsTrigger = () => {
return {
type: FsmParamTypeEnum.Trigger,
value: false,
}
}
export const getInitParamsNumber = () => {
return {
type: FsmParamTypeEnum.Number,
value: 0,
}
}
/***
*
* 1.entity的state或者direction改变触发setter
* 2.setter里触发fsm的setParams方法
* 3.setParams执行run方法run方法由子类重写
* 4.run方法会更改currentStatecurrentState的setter
* 5-1.currentState是子状态机run方法run方法又会设置子状态机的currentStaterun方法
* 5-2.run方法就是播放动画
*/
/***
*
*/
@ccclass('StateMachine')
export default abstract class StateMachine extends Component {
private _currentState: State | SubStateMachine = null
params: Map<string, IParamsValue> = new Map()
stateMachines: Map<string, SubStateMachine | State> = new Map()
animationComponent: Animation
getParams(paramName: string) {
if (this.params.has(paramName)) {
return this.params.get(paramName).value
}
}
setParams(paramName: string, value: ParamsValueType) {
if (this.params.has(paramName)) {
this.params.get(paramName).value = value
this.run()
this.resetTrigger()
}
}
get currentState() {
return this._currentState
}
set currentState(newState) {
if (!newState) {
return
}
this._currentState = newState
this._currentState.run()
}
/***
* trigger
*/
resetTrigger() {
for (const [, value] of this.params) {
if (value.type === FsmParamTypeEnum.Trigger) {
value.value = false
}
}
}
/***
* currentState
*/
abstract init(...args: any[]): void
abstract run(): void
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "66538d45-0fcf-4ed2-8e47-a0a688ddaf3c",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,30 @@
import State from './State'
import StateMachine from './StateMachine'
/***
*
* idle的statestate都封装在子状态机中
*/
export default abstract class SubStateMachine {
private _currentState: State = null
stateMachines: Map<string, State> = new Map()
constructor(public fsm: StateMachine) {}
get currentState() {
return this._currentState
}
set currentState(newState) {
if (!newState) {
return
}
this._currentState = newState
this._currentState.run()
}
/***
*
*/
abstract run(): void
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "7f9fac71-9820-41b2-8b4d-2dc4185414ef",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "b0c3f1a6-89a2-4921-bf10-22ae7925cf6e",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "9265fd0c-f1ae-471b-afa0-7f17e87d408f",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,85 @@
import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, RigidBody2D, instantiate } from 'cc'
import { EntityManager } from '../../Base/EntityManager'
import { EntityTypeEnum, EntityStateEnum, EventEnum, PrefabPathEnum } from '../../Enum'
import DataManager, { IBullet, IVec2 } from '../../Global/DataManager'
import EventManager from '../../Global/EventManager'
import ObjectPoolManager from '../../Global/ObjectPoolManager'
import { rad2Angle } from '../../Utils'
import { ExplosionManager } from '../Explosion/ExplosionManager'
import { BulletStateMachine } from './BulletStateMachine'
const { ccclass, property } = _decorator
@ccclass('BulletManager')
export class BulletManager extends EntityManager {
//静态数据
id = 1
owner = 1
type = EntityTypeEnum.Bullet1
//动态数据
position: IVec2
direction: IVec2
private angle: number
init({ id, owner, type }: IBullet) {
this.id = id
this.owner = owner
this.type = type
this.fsm = this.addComponent(BulletStateMachine)
this.fsm.init(type)
this.state = EntityStateEnum.Idle
this.node.active = false
EventManager.Instance.on(EventEnum.Explosion, this.handleExplosion, this)
}
onDisable() {
EventManager.Instance.off(EventEnum.Explosion, this.handleExplosion, this)
}
handleExplosion(id: number, { x, y }: IVec2) {
if (this.id !== id) {
return
}
const explosion = ObjectPoolManager.Instance.getPoolObject(EntityTypeEnum.Explosion)
const explosionManager = explosion.getComponent(ExplosionManager) || explosion.addComponent(ExplosionManager)
explosionManager.init(EntityTypeEnum.Explosion, {
x, y,
})
ObjectPoolManager.Instance.returnPoolObject(this.node)
}
render(data: IBullet) {
this.node.active = true
this.renderPosition(data)
this.renderDirection(data)
}
renderPosition(data: IBullet) {
this.node.setPosition(data.position.x, data.position.y)
}
renderDirection(data: IBullet) {
if (this.angle === undefined) {
const { x, y } = data.direction
const side = Math.sqrt(x * x + y * y)
this.angle = x > 0 ? rad2Angle(Math.asin(y / side)) : rad2Angle(Math.asin(- y / side)) + 180
}
this.node.setRotationFromEuler(0, 0, this.angle)
// let angle: number, sign: number
// if (x !== 0) {
// angle = x > 0 ? rad2Angle(Math.atan(y / x)) : rad2Angle(Math.atan(-y / x)) + 180
// sign = x > 0 ? 1 : -1
// } else {
// angle = rad2Angle(Math.PI / 2)
// sign = y > 0 ? 1 : -1
// }
// this.node.setRotationFromEuler(0, 0, sign * angle)
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "3cb4bec9-dd63-4ffe-9a28-8f8347cd327b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,45 @@
import { _decorator, Animation, AnimationClip } from 'cc'
import State from '../../Base/State'
import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine'
import { EntityTypeEnum, TexturePathEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum'
const { ccclass, property } = _decorator
@ccclass('BulletStateMachine')
export class BulletStateMachine extends StateMachine {
type: EntityTypeEnum
init(type: EntityTypeEnum) {
this.type = type
this.animationComponent = this.node.addComponent(Animation)
this.initParams()
this.initStateMachines()
this.initAnimationEvent()
}
initParams() {
this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger())
}
initStateMachines() {
this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`))
}
initAnimationEvent() {
}
run() {
switch (this.currentState) {
case this.stateMachines.get(ParamsNameEnum.Idle):
if (this.params.get(ParamsNameEnum.Idle).value) {
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
} else {
this.currentState = this.currentState
}
break
default:
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
break
}
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "531b884c-93b6-4d0e-a0fc-e8861eebf6e7",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "3302ce3a-fac5-42c6-8060-e3e8682cfcf1",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,17 @@
import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, RigidBody2D } from 'cc'
import { EntityManager } from '../../Base/EntityManager'
import { EntityTypeEnum, EntityStateEnum, EventEnum } from '../../Enum'
import { IBullet, IVec2 } from '../../Global/DataManager'
import { ExplosionStateMachine } from './ExplosionStateMachine'
const { ccclass, property } = _decorator
@ccclass('ExplosionManager')
export class ExplosionManager extends EntityManager {
init(type: EntityTypeEnum, { x, y }: IVec2) {
this.node.setPosition(x, y)
this.fsm = this.addComponent(ExplosionStateMachine)
this.fsm.init(type)
this.state = EntityStateEnum.Idle
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "34e9e358-082f-4674-9e38-a3c27f8b013b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,52 @@
import { _decorator, Animation, AnimationClip } from 'cc'
import State from '../../Base/State'
import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine'
import { EntityTypeEnum, TexturePathEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum'
import ObjectPoolManager from '../../Global/ObjectPoolManager'
const { ccclass, property } = _decorator
@ccclass('ExplosionStateMachine')
export class ExplosionStateMachine extends StateMachine {
type: EntityTypeEnum
init(type: EntityTypeEnum) {
this.type = type
this.animationComponent = this.node.addComponent(Animation)
this.initParams()
this.initStateMachines()
this.initAnimationEvent()
}
initParams() {
this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger())
}
initStateMachines() {
this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`))
}
initAnimationEvent() {
this.animationComponent.on(Animation.EventType.FINISHED, () => {
const whiteList = [EntityStateEnum.Idle]
const name = this.animationComponent.defaultClip.name
if (whiteList.some(v => name.includes(v))) {
ObjectPoolManager.Instance.returnPoolObject(this.node)
}
})
}
run() {
switch (this.currentState) {
case this.stateMachines.get(ParamsNameEnum.Idle):
if (this.params.get(ParamsNameEnum.Idle).value) {
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
} else {
this.currentState = this.currentState
}
break
default:
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
break
}
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "35a9f553-26d5-49c8-bcc0-d1011c07e124",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "5802fd2f-7823-4294-91c8-d71adca41319",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,118 @@
import { _decorator, Vec2, RigidBody2D, BoxCollider2D, Size, ERigidBody2DType, Prefab, instantiate, Input, ProgressBar, Label } from 'cc';
import { EntityManager } from '../../Base/EntityManager';
import { EntityTypeEnum, EntityStateEnum, EventEnum, InputType, PrefabPathEnum } from '../../Enum';
import DataManager, { IPlayer, IVec2 } from '../../Global/DataManager';
import EventManager from '../../Global/EventManager';
import { ResourceManager } from '../../Global/ResourceManager';
import { rad2Angle } from '../../Utils';
import { WeaponManager } from '../Weapon/WeaponManager';
import { PlayerStateMachine } from './PlayerStateMachine';
const { ccclass, property } = _decorator;
@ccclass('PlayerManager')
export class PlayerManager extends EntityManager {
//静态数据
id = 1
nickname = ''
type = EntityTypeEnum.Player1
weaponType = EntityTypeEnum.Weapon1
bulletType = EntityTypeEnum.Bullet1
//动态数据
hp: number
position: IVec2
direction: IVec2
private hpBar: ProgressBar
private nicknameLabel: Label
private weapon: WeaponManager
get isSelf() {
return DataManager.Instance.myPlayerId === this.id
}
init(data: IPlayer) {
const { id, nickname, type, weaponType, bulletType } = data
this.id = id
this.nickname = nickname
this.type = type
this.weaponType = weaponType
this.bulletType = bulletType
this.hpBar = this.node.getComponentInChildren(ProgressBar)
this.nicknameLabel = this.node.getComponentInChildren(Label)
this.nicknameLabel.string = data.nickname
this.fsm = this.addComponent(PlayerStateMachine)
this.fsm.init(type)
const weaponPrefab = DataManager.Instance.prefabMap.get(this.weaponType)
const weapon = instantiate(weaponPrefab)
weapon.setParent(this.node)
this.weapon = weapon.addComponent(WeaponManager)
this.weapon.init(data)
}
tick(dt: number) {
if (!this.isSelf) {
return
}
// if (!DataManager.Instance.jm.input.length()) {
// return
// }
const { x, y } = DataManager.Instance.jm.input
DataManager.Instance.applyInput({
type: InputType.PlayerMove,
id: this.id,
direction: {
x,
y
},
dt
})
}
render(data: IPlayer) {
this.renderHP(data)
this.renderPosition(data)
this.renderDirection(data)
}
renderHP(data: IPlayer) {
this.hpBar.progress = data.hp / this.hpBar.totalLength
}
renderPosition(data: IPlayer) {
this.node.setPosition(data.position.x, data.position.y)
}
renderDirection(data: IPlayer) {
if (data.direction.x === 0 && data.direction.y === 0) {
this.state = EntityStateEnum.Idle
return
}
this.state = EntityStateEnum.Run
const { x, y } = data.direction
if (x !== 0) {
this.node.setScale(x > 0 ? 1 : -1, 1)
this.nicknameLabel.node.setScale(x > 0 ? 1 : -1, 1)
}
const side = Math.sqrt(x * x + y * y)
const angle = rad2Angle(Math.asin(y / side))
this.weapon.node.setRotationFromEuler(0, 0, angle)
// const { x, y } = joystick.input
// let angle: number, sign: number
// if (x !== 0) {
// angle = rad2Angle(Math.atan(y / x))
// sign = joystick.input.x > 0 ? 1 : -1
// } else {
// angle = rad2Angle(Math.PI / 2)
// sign = joystick.input.y > 0 ? 1 : -1
// }
// this.node.setRotationFromEuler(0, 0, sign * angle)
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "4cc81cda-b869-4eb8-855e-126f16aa7a12",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,49 @@
import { _decorator, Animation, AnimationClip } from 'cc'
import State from '../../Base/State'
import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine'
import { EntityTypeEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum'
const { ccclass, property } = _decorator
@ccclass('PlayerStateMachine')
export class PlayerStateMachine extends StateMachine {
type: EntityTypeEnum
init(type: EntityTypeEnum) {
this.type = type
this.animationComponent = this.node.addComponent(Animation)
this.initParams()
this.initStateMachines()
this.initAnimationEvent()
}
initParams() {
this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger())
this.params.set(ParamsNameEnum.Run, getInitParamsTrigger())
}
initStateMachines() {
this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`, AnimationClip.WrapMode.Loop))
this.stateMachines.set(ParamsNameEnum.Run, new State(this, `${this.type}${EntityStateEnum.Run}`, AnimationClip.WrapMode.Loop))
}
initAnimationEvent() {
}
run() {
switch (this.currentState) {
case this.stateMachines.get(ParamsNameEnum.Idle):
case this.stateMachines.get(ParamsNameEnum.Run):
if (this.params.get(ParamsNameEnum.Run).value) {
this.currentState = this.stateMachines.get(ParamsNameEnum.Run)
} else if (this.params.get(ParamsNameEnum.Idle).value) {
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
} else {
this.currentState = this.currentState
}
break
default:
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
break
}
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "3bdb087b-0d43-4b85-81e4-e480cd43405d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "b8a46a8b-5505-436b-8870-2965599d2168",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,73 @@
import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, UITransform } from 'cc'
import { EntityManager } from '../../Base/EntityManager'
import { EntityTypeEnum, EntityStateEnum, EventEnum, InputType } from '../../Enum'
import DataManager, { IPlayer } from '../../Global/DataManager'
import EventManager from '../../Global/EventManager'
import { WeaponStateMachine } from './WeaponStateMachine'
const { ccclass, property } = _decorator
@ccclass('WeaponManager')
export class WeaponManager extends EntityManager {
owner = 1
type = EntityTypeEnum.Weapon1
private body: Node
private anchor: Node
private point: Node
get isSelf() {
return DataManager.Instance.myPlayerId === this.owner
}
init({ id, weaponType }: IPlayer) {
this.owner = id
this.type = weaponType
this.node.setSiblingIndex(0)
this.body = this.node.getChildByName("Body")
this.anchor = this.body.getChildByName("Anchor")
this.point = this.anchor.getChildByName("Point")
this.fsm = this.body.addComponent(WeaponStateMachine)
this.fsm.init(weaponType)
this.state = EntityStateEnum.Idle
EventManager.Instance.on(EventEnum.WeaponShoot, this.handleWeaponShoot, this)
this.isSelf && EventManager.Instance.on(EventEnum.ShootBtnClick, this.handleShootBtnClick, this)
}
onDestroy() {
this.isSelf && EventManager.Instance.off(EventEnum.ShootBtnClick, this.handleShootBtnClick, this)
EventManager.Instance.off(EventEnum.WeaponShoot, this.handleWeaponShoot, this)
}
handleWeaponShoot(id: number) {
if (this.owner !== id) {
return
}
this.state = EntityStateEnum.Attack
}
handleShootBtnClick() {
const pointWorldPos = this.point.getWorldPosition()
const pointStagePos = DataManager.Instance.gm.stage.getComponent(UITransform).convertToNodeSpaceAR(pointWorldPos);
const anchorWorldPos = this.anchor.getWorldPosition()
const directionVec2 = new Vec2(pointWorldPos.x - anchorWorldPos.x, pointWorldPos.y - anchorWorldPos.y).normalize()
DataManager.Instance.applyInput({
type: InputType.WeaponShoot,
owner: this.owner,
position: {
x: pointStagePos.x,
y: pointStagePos.y
},
direction: {
x: directionVec2.x,
y: directionVec2.y
},
})
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "eefb7dfd-3b96-46cc-a83a-c5bafe656d8a",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,58 @@
import { _decorator, Animation, AnimationClip } from 'cc'
import State from '../../Base/State'
import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine'
import { EntityStateEnum, EntityTypeEnum, ParamsNameEnum } from '../../Enum'
import { WeaponManager } from './WeaponManager'
const { ccclass, property } = _decorator
@ccclass('WeaponStateMachine')
export class WeaponStateMachine extends StateMachine {
type: EntityTypeEnum
init(type: EntityTypeEnum) {
this.type = type
this.animationComponent = this.node.addComponent(Animation)
this.initParams()
this.initStateMachines()
this.initAnimationEvent()
}
initParams() {
this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger())
this.params.set(ParamsNameEnum.Attack, getInitParamsTrigger())
}
initStateMachines() {
this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`))
this.stateMachines.set(ParamsNameEnum.Attack, new State(this, `${this.type}${EntityStateEnum.Attack}`, AnimationClip.WrapMode.Normal, true))
}
initAnimationEvent() {
this.animationComponent.on(Animation.EventType.FINISHED, () => {
const whiteList = [EntityStateEnum.Attack]
const name = this.animationComponent.defaultClip.name
if (whiteList.some(v => name.includes(v))) {
this.node.parent.getComponent(WeaponManager).state = EntityStateEnum.Idle
}
})
}
run() {
switch (this.currentState) {
case this.stateMachines.get(ParamsNameEnum.Idle):
case this.stateMachines.get(ParamsNameEnum.Attack):
if (this.params.get(ParamsNameEnum.Attack).value) {
this.currentState = this.stateMachines.get(ParamsNameEnum.Attack)
} if (this.params.get(ParamsNameEnum.Idle).value) {
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
} else {
this.currentState = this.currentState
}
break
default:
this.currentState = this.stateMachines.get(ParamsNameEnum.Idle)
break
}
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "1eed66f0-cb8f-4cc9-9f91-aa21b5c2883c",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "5b95c11b-0954-45ac-99ba-98df4825c906",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,68 @@
export enum FsmParamTypeEnum {
Number = 'Number',
Trigger = 'Trigger',
}
export enum EntityStateEnum {
Idle = 'Idle',
Run = 'Run',
Attack = 'Attack',
}
export enum ParamsNameEnum {
Idle = 'Idle',
Run = 'Run',
Attack = 'Attack',
}
export enum EventEnum {
ShootBtnClick = 'ShootBtnClick',
WeaponShoot = 'WeaponShoot',
Explosion = 'Explosion'
}
export enum EntityTypeEnum {
Map1 = 'Map1',
Player1 = 'Player1',
Player2 = 'Player2',
Weapon1 = 'Weapon1',
Weapon2 = 'Weapon2',
Bullet1 = 'Bullet1',
Bullet2 = 'Bullet2',
Explosion = 'Explosion',
JoyStick = 'JoyStick',
Shoot = 'Shoot',
}
export enum PrefabPathEnum {
Map1 = 'prefab/Map1',
Player1 = 'prefab/Player',
Player2 = 'prefab/Player',
Weapon1 = 'prefab/Weapon1',
Weapon2 = 'prefab/Weapon2',
Bullet1 = 'prefab/Bullet',
Bullet2 = 'prefab/Bullet',
Explosion = 'prefab/Explosion',
JoyStick = 'prefab/JoyStick',
Shoot = 'prefab/Shoot',
}
export enum TexturePathEnum {
Player1Idle = 'texture/player/player1/idle',
Player1Run = 'texture/player/player1/run',
Player2Idle = 'texture/player/player2/idle',
Player2Run = 'texture/player/player2/run',
Weapon1Idle = 'texture/weapon/weapon1/idle',
Weapon1Attack = 'texture/weapon/weapon1/attack',
Weapon2Idle = 'texture/weapon/weapon2/idle',
Weapon2Attack = 'texture/weapon/weapon2/attack',
Bullet1Idle = 'texture/bullet/bullet1',
Bullet2Idle = 'texture/bullet/bullet2',
ExplosionIdle = 'texture/explosion',
}
export enum InputType {
PlayerMove = 'PlayerMove',
WeaponShoot = 'WeaponShoot',
TimePast = 'TimePast',
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "393286c2-7b09-44d1-955f-049e7e5b36ea",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "6262be8a-effd-4208-89cd-6532b055b4a0",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,164 @@
import { Input, Prefab, SpriteFrame } from 'cc'
import Singleton from '../Base/Singleton'
import { BulletManager } from '../Entity/Bullet/BulletManager'
import { PlayerManager } from '../Entity/Player/PlayerManager'
import { WeaponManager } from '../Entity/Weapon/WeaponManager'
import { EntityStateEnum, EntityTypeEnum, EventEnum, InputType } from '../Enum'
import { BattleManager } from '../Scene/BattleManager'
import { JoyStickManager } from '../UI/JoyStickManager'
import EventManager from './EventManager'
import ObjectPoolManager from './ObjectPoolManager'
export type IPlayer = Pick<PlayerManager, 'id' | 'nickname' | 'hp' | 'position' | 'direction' | 'type' | 'weaponType' | 'bulletType'>
export type IBullet = Pick<BulletManager, 'id' | 'owner' | 'position' | 'direction' | 'type'>
const PLAYER_SPEED = 100
const BULLET_SPEED = 600
const WEAPON_DAMAGE = 5
const PLAYER_RADIUS = 50
const BULLET_RADIUS = 10
export interface IVec2 {
x: number;
y: number
}
interface IState {
players: IPlayer[],
bullets: IBullet[],
nextBulletId: number
}
interface IPlayerMove {
type: InputType.PlayerMove
id: number;
direction: IVec2;
dt: number
}
interface IWeaponShoot {
type: InputType.WeaponShoot
owner: number;
position: IVec2;
direction: IVec2;
}
interface ITimePast {
type: InputType.TimePast;
dt: number
}
export default class DataManager extends Singleton {
static get Instance() {
return super.GetInstance<DataManager>()
}
gm: BattleManager
jm: JoyStickManager
myPlayerId = 1
prefabMap: Map<string, Prefab> = new Map()
textureMap: Map<string, SpriteFrame[]> = new Map()
playerMap: Map<number, PlayerManager> = new Map()
bulletMap: Map<number, BulletManager> = new Map()
state: IState = {
players: [{
id: 2,
nickname: "哈哈1",
position: {
x: -200,
y: -200
},
direction: {
x: 1,
y: 0
},
hp: 100,
type: EntityTypeEnum.Player1,
weaponType: EntityTypeEnum.Weapon1,
bulletType: EntityTypeEnum.Bullet1,
}, {
id: 1,
nickname: "哈哈2",
position: {
x: 200,
y: 200
},
direction: {
x: 0,
y: -1
},
hp: 100,
type: EntityTypeEnum.Player2,
weaponType: EntityTypeEnum.Weapon2,
bulletType: EntityTypeEnum.Bullet2,
}],
bullets: [],
nextBulletId: 1
}
applyInput(input: IPlayerMove | IWeaponShoot | ITimePast) {
switch (input.type) {
case InputType.PlayerMove: {
const { direction: { x, y }, dt, id } = input
const player = this.state.players.find(e => e.id === id)
if (!player) {
return
}
player.position.x += x * PLAYER_SPEED * dt
player.position.y += y * PLAYER_SPEED * dt
player.direction = { x, y }
break
}
case InputType.WeaponShoot: {
const { owner, position, direction } = input
const bullet: IBullet = {
id: this.state.nextBulletId++,
owner,
position,
direction,
type: this.playerMap.get(owner).bulletType
}
this.state.bullets.push(bullet)
EventManager.Instance.emit(EventEnum.WeaponShoot, owner)
break
}
case InputType.TimePast: {
const { dt } = input
const { bullets, players } = this.state
for (let i = bullets.length - 1; i >= 0; i--) {
const bullet = bullets[i];
for (let j = players.length - 1; j >= 0; j--) {
const player = players[j];
if (((player.position.x - bullet.position.x) ** 2 + (player.position.y - bullet.position.y) ** 2) < (PLAYER_RADIUS + BULLET_RADIUS) ** 2) {
EventManager.Instance.emit(EventEnum.Explosion, bullet.id, {
x: (player.position.x + bullet.position.x) / 2,
y: (player.position.y + bullet.position.y) / 2,
})
player.hp -= WEAPON_DAMAGE
bullets.splice(i, 1)
break
}
}
}
for (const bullet of this.state.bullets) {
bullet.position.x += bullet.direction.x * BULLET_SPEED * dt
bullet.position.y += bullet.direction.y * BULLET_SPEED * dt
}
}
}
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "1682ed16-4e4f-46b3-8aca-92baecd30b9d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,42 @@
import Singleton from '../Base/Singleton';
import { EventEnum } from '../Enum';
interface IItem {
func: Function;
ctx: unknown;
}
export default class EventManager extends Singleton {
static get Instance() {
return super.GetInstance<EventManager>();
}
private eventMap: Map<EventEnum, Array<IItem>> = new Map();
on(event: EventEnum, func: Function, ctx?: unknown) {
if (this.eventMap.has(event)) {
this.eventMap.get(event).push({ func, ctx });
} else {
this.eventMap.set(event, [{ func, ctx }]);
}
}
off(event: EventEnum, func: Function, ctx?: unknown) {
if (this.eventMap.has(event)) {
const index = this.eventMap.get(event).findIndex(i => func === i.func && i.ctx === ctx);
index > -1 && this.eventMap.get(event).splice(index, 1);
}
}
emit(event: EventEnum, ...params: unknown[]) {
if (this.eventMap.has(event)) {
this.eventMap.get(event).forEach(({ func, ctx }) => {
ctx ? func.apply(ctx, params) : func(...params);
});
}
}
clear() {
this.eventMap.clear();
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "2aa2e7de-b014-4ee7-a537-4bc99dbf9164",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,44 @@
import Singleton from '../Base/Singleton'
export default class NetworkManager extends Singleton {
static get Instance() {
return super.GetInstance<NetworkManager>()
}
ws: WebSocket
port = 8888
connect() {
return new Promise((resolve, reject) => {
this.ws = new WebSocket(`ws://localhost:${this.port}`)
this.ws.onopen = () => {
console.log("ws onopen")
resolve(null)
}
this.ws.onerror = () => {
console.log("ws onerror")
reject()
}
this.ws.onclose = () => {
console.log("ws onclose")
reject()
}
this.ws.onmessage = (data) => {
console.log("onmessage", data);
}
})
}
sendMsg(data) {
this.ws.send(data)
}
async callApi(path: string) {
return await fetch(`http://localhost:${this.port}${path}`).then((res) => res.json())
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "588dfbf5-0456-472f-8382-746392fb1a06",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,52 @@
import Singleton from '../Base/Singleton'
import { instantiate, Node, Prefab } from 'cc'
import { EntityTypeEnum } from '../Enum'
import DataManager from './DataManager'
import { ResourceManager } from './ResourceManager'
export default class ObjectPoolManager extends Singleton {
static get Instance() {
return super.GetInstance<ObjectPoolManager>()
}
private objectPool: Node = null
private poolObjectMap: Map<EntityTypeEnum, Node[]> = new Map()
private getObjectContainerName(objectName: EntityTypeEnum) {
return objectName + 'Pool'
}
getPoolObject(objectName: EntityTypeEnum) {
if (this.objectPool === null) {
this.objectPool = new Node("ObjectPool")
this.objectPool.setParent(DataManager.Instance.gm.stage)
}
if (!this.poolObjectMap.has(objectName)) {
this.poolObjectMap.set(objectName, [])
const container = new Node(this.getObjectContainerName(objectName))
container.setParent(this.objectPool)
}
let node: Node
const nodes = this.poolObjectMap.get(objectName)
const index = nodes.findIndex(node => node.active)
if (index === -1) {
const prefab = DataManager.Instance.prefabMap.get(objectName)
node = instantiate(prefab)
node.name = objectName
node.setParent(this.objectPool.getChildByName(this.getObjectContainerName(objectName)))
} else {
node = nodes.splice(index, 1)[0]
}
node.active = true
return node
}
returnPoolObject(object: Node) {
object.active = false
const objectName = object.name as EntityTypeEnum
this.poolObjectMap.get(objectName).push(object)
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "01a37612-1a4a-45ee-8be8-3e3360996442",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,32 @@
import { _decorator, resources, SpriteFrame, Asset } from 'cc'
import Singleton from '../Base/Singleton'
export class ResourceManager extends Singleton {
static get Instance() {
return super.GetInstance<ResourceManager>()
}
loadRes<T extends Asset>(path: string, type: new (...args: any[]) => T) {
return new Promise<T>((resolve, reject) => {
resources.load(path, type, (err, res) => {
if (err) {
reject(err)
return
}
resolve(res)
})
})
}
loadDir<T extends Asset>(path: string, type: new (...args: any[]) => T) {
return new Promise<T[]>((resolve, reject) => {
resources.loadDir(path, type, (err, res) => {
if (err) {
reject(err)
return
}
resolve(res)
})
})
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "6278727d-3641-46d1-ae43-52b7829402d1",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "7129d004-4256-413c-a2e9-34ee8607d89d",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,156 @@
import { _decorator, Component, Node, resources, Prefab, instantiate, Vec2, SpriteFrame } from 'cc';
import { PlayerManager } from '../Entity/Player/PlayerManager';
import DataManager from '../Global/DataManager';
import { JoyStickManager } from '../UI/JoyStickManager';
import { ResourceManager } from '../Global/ResourceManager';
import { EntityTypeEnum, InputType, PrefabPathEnum, TexturePathEnum } from '../Enum';
import NetworkManager from '../Global/NetworkManager';
import ObjectPoolManager from '../Global/ObjectPoolManager';
import { BulletManager } from '../Entity/Bullet/BulletManager';
const { ccclass, property, requireComponent } = _decorator;
@ccclass('BattleManager')
export class BattleManager extends Component {
stage: Node
ui: Node
isInited = false
onLoad() {
DataManager.Instance.gm = this
this.stage = this.node.getChildByName("Stage")
this.ui = this.node.getChildByName("UI")
}
async start() {
this.clearGame()
await this.loadRes()
await this.initScene()
this.isInited = true
}
clearGame() {
this.stage.destroyAllChildren()
this.ui.destroyAllChildren()
}
async initScene() {
// await NetworkManager.Instance.connect()
// NetworkManager.Instance.sendMsg("我是客户端!!")
// const data = await NetworkManager.Instance.callApi("/join")
// console.log("data", data);
await Promise.all([
this.initJoyStick(),
this.initFire(),
this.initMap(),
])
}
async loadRes() {
const list = []
for (const type in PrefabPathEnum) {
const p = ResourceManager.Instance.loadRes(PrefabPathEnum[type], Prefab).then((prefab) => {
DataManager.Instance.prefabMap.set(type, prefab)
})
list.push(p)
}
for (const type in TexturePathEnum) {
const p = ResourceManager.Instance.loadDir(TexturePathEnum[type], SpriteFrame).then((spriteFrames) => {
DataManager.Instance.textureMap.set(type, spriteFrames)
})
list.push(p)
}
await Promise.all(list)
}
async initJoyStick() {
const joySitckPrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.JoyStick], Prefab)
const joySitck = instantiate(joySitckPrefab)
joySitck.setParent(this.ui)
const jm = DataManager.Instance.jm = joySitck.getComponent(JoyStickManager)
await jm.init()
}
async initFire() {
const firePrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.Shoot], Prefab)
const fire = instantiate(firePrefab)
fire.setParent(this.ui)
}
async initMap() {
const mapPrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.Map1], Prefab)
const map = instantiate(mapPrefab)
map.setParent(this.stage)
}
update(dt: number) {
if (!this.isInited) {
return
}
this.render()
this.tick(dt)
}
tick(dt: number) {
this.tickPlayer(dt)
DataManager.Instance.applyInput({
type: InputType.TimePast,
dt
})
}
tickPlayer(dt: number) {
const players = DataManager.Instance.state.players
for (const p of players) {
const playerManager = DataManager.Instance.playerMap.get(p.id)
if (!playerManager) {
return
}
playerManager.tick(dt)
}
}
render() {
this.renderPlayer()
this.renderBullet()
}
renderPlayer() {
const players = DataManager.Instance.state.players
for (const p of players) {
let playerManager = DataManager.Instance.playerMap.get(p.id)
if (!playerManager) {
const playerPrefab = DataManager.Instance.prefabMap.get(p.type)
const player = instantiate(playerPrefab)
player.setParent(this.stage)
playerManager = player.addComponent(PlayerManager)
DataManager.Instance.playerMap.set(p.id, playerManager)
playerManager.init(p)
} else {
playerManager.render(p)
}
}
}
renderBullet() {
const bullets = DataManager.Instance.state.bullets
for (const b of bullets) {
let bulletManager = DataManager.Instance.bulletMap.get(b.id)
if (!bulletManager) {
const bullet = ObjectPoolManager.Instance.getPoolObject(b.type)
bulletManager = bullet.getComponent(BulletManager) || bullet.addComponent(BulletManager)
DataManager.Instance.bulletMap.set(b.id, bulletManager)
bulletManager.init(b)
} else {
bulletManager.render(b)
}
}
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "d8c46424-e6ab-4d22-af07-293ce98d8b5b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "03ce230a-7d62-422c-b453-aafdbec11e91",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,58 @@
import { _decorator, Component, Node, input, Input, EventTouch, Vec2, Vec3, UITransform } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('JoyStickManager')
export class JoyStickManager extends Component {
input: Vec2 = new Vec2(0, 0)
private body: Node
private stick: Node
private touchStartPos: Vec2
private defaultPos: Vec2
private radius: number = 0
async init() {
this.body = this.node.getChildByName("Body")
this.stick = this.body.getChildByName("Stick")
const { x, y } = this.body.position
this.defaultPos = new Vec2(x, y)
this.radius = this.body.getComponent(UITransform).contentSize.x / 2
input.on(Input.EventType.TOUCH_START, this.onTouchMove, this);
input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this);
input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this);
}
onDestroy() {
input.off(Input.EventType.TOUCH_START, this.onTouchMove, this);
input.off(Input.EventType.TOUCH_MOVE, this.onTouchMove, this);
input.off(Input.EventType.TOUCH_END, this.onTouchEnd, this);
}
onTouchMove(e: EventTouch) {
const touchPos = e.touch.getUILocation()
if (!this.touchStartPos) {
this.touchStartPos = touchPos.clone()
this.body.setPosition(this.touchStartPos.x, this.touchStartPos.y);
}
const stickPos = new Vec2(touchPos.x - this.touchStartPos.x, touchPos.y - this.touchStartPos.y)
// const stickPos = new Vec2(0, touchPos.y - this.touchStartPos.y)
const len = stickPos.length()
if (len > this.radius) {
stickPos.multiplyScalar(this.radius / len)
}
this.stick.setPosition(stickPos.x, stickPos.y)
this.input = stickPos.clone().normalize()
}
onTouchEnd() {
this.body.setPosition(this.defaultPos.x, this.defaultPos.y)
this.stick.setPosition(0, 0)
this.touchStartPos = undefined
this.input = new Vec2(0, 0)
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "bfc9a6e3-7ecf-4422-af5c-670bff4ec928",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,13 @@
import { _decorator, Component, Node } from 'cc';
import { EventEnum } from '../Enum';
import EventManager from '../Global/EventManager';
const { ccclass, property } = _decorator;
@ccclass('ShootManager')
export class ShootManager extends Component {
fire() {
EventManager.Instance.emit(EventEnum.ShootBtnClick)
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "f4c4bbdf-77d3-44a3-88c2-29f40401dab7",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "f395bd07-24d1-424e-bf3c-3276de3d9d22",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,20 @@
import { Layers, SpriteFrame, Node, UITransform } from "cc"
const INDEX_REG = /\((\d+)\)/
const getNumberWithinString = (str: string) => parseInt(str.match(INDEX_REG)?.[1] || '0')
export const sortSpriteFrame = (spriteFrame: Array<SpriteFrame>) =>
spriteFrame.sort((a, b) => getNumberWithinString(a.name) - getNumberWithinString(b.name))
const getUIMaskNumber = () => 1 << Layers.nameToLayer('UI_2D')
export const createUINode = (name: string = '') => {
const node = new Node(name)
node.layer = getUIMaskNumber()
const transform = node.addComponent(UITransform)
return node
}
export const rad2Angle = (rad: number) => rad / Math.PI * 180

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "2e280f2e-52a3-465a-acf5-fb412ef51d6b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,15 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "361398e8-25a2-4476-a5dd-833ff68e087b",
"files": [],
"subMetas": {},
"userData": {
"isBundle": true,
"bundleName": "resources",
"priority": 8,
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "35ebed99-20d7-4d22-b7af-28eeb7960a84",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,142 @@
[
{
"__type__": "cc.Prefab",
"_name": "Bullet",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Bullet",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 6
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 110.951,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 3
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "607/QqeHhEZJSeteJoUog1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f4rVayGkpKJq+xMADzqU5V"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bblSIxXVJAw4TCQ+fTNSBM"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "099548f8-37b4-475d-86df-9ad4a5ecfd77",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Bullet"
}
}

View File

@ -0,0 +1,142 @@
[
{
"__type__": "cc.Prefab",
"_name": "Explosion",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Explosion",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 6
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 110.951,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 3
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "607/QqeHhEZJSeteJoUog1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f4rVayGkpKJq+xMADzqU5V"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bblSIxXVJAw4TCQ+fTNSBM"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "147de574-5396-440e-af4f-e4af24888059",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Explosion"
}
}

View File

@ -0,0 +1,580 @@
[
{
"__type__": "cc.Prefab",
"_name": "JoyStick",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "JoyStick",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 22
},
{
"__id__": 24
},
{
"__id__": 26
}
],
"_prefab": {
"__id__": 28
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -480,
"y": -320,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Body",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 17
},
{
"__id__": 19
}
],
"_prefab": {
"__id__": 21
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 150,
"y": 150,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Base",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
},
{
"__id__": 6
},
{
"__id__": 8
}
],
"_prefab": {
"__id__": 10
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6ejPyOfqRE25w9zJbDGdh3"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 100
},
"_spriteFrame": {
"__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "396m9Nih1MWY7F/ybvFrtB"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 256,
"_originalHeight": 256,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8aBKAmKmJBXaZ2Dk38BikC"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "2cvfYjo35GkoZTmD0R1ZON"
},
{
"__type__": "cc.Node",
"_name": "Stick",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
},
{
"__id__": 14
}
],
"_prefab": {
"__id__": 16
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.3,
"y": 0.3,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"__prefab": {
"__id__": 13
},
"_contentSize": {
"__type__": "cc.Size",
"width": 256,
"height": 256
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "68QvW/9ZZAdJjB1N+Guag4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"__prefab": {
"__id__": 15
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0eWKGBz4ZAersuhv4N5kwz"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "d4qE3f1kdGBLQFmhtG8C+3"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e1c6xTNM1KiYCaRC1S5oje"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_alignFlags": 12,
"_target": null,
"_left": 50,
"_right": 0,
"_top": 0,
"_bottom": 50,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e48MgFyt9PBKx5Ys0BJg4L"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "87eH76xUVLFb6r1A+7tq4F"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 23
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "205oXiJoZHkaJi8XBhtLEO"
},
{
"__type__": "bfc9abjfs9EIq9cZwv/Tsko",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 25
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20KqWYRFJKzoRcoD115OfT"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 27
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 960,
"_originalHeight": 640,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "76WrdM2MBFXbRZNvn2wO8t"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "dcSQx/IBRN555vh0smiDUk"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "230d01f4-702b-4295-b34c-d87e25305d63",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "JoyStick"
}
}

View File

@ -0,0 +1,180 @@
[
{
"__type__": "cc.Prefab",
"_name": "Map1",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Map1",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 4
},
{
"__id__": 6
}
],
"_prefab": {
"__id__": 8
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 3
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7ckWiSysVO96kRBBg+KESt"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 2,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "26C4/mRGRLBr2jAzW8ztmg"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1000,
"_originalHeight": 1000,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ecteqJwWZC+a13hCI929/h"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "9dDZjW4/pG3qtXeK7m3DFi"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "ab1c7b4f-35ac-4610-98a9-ea4b5b8170f8",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Map1"
}
}

View File

@ -0,0 +1,690 @@
[
{
"__type__": "cc.Prefab",
"_name": "Player",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Player",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 18
},
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 28
},
{
"__id__": 30
}
],
"_prefab": {
"__id__": 32
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "HP",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
}
],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
},
{
"__id__": 15
}
],
"_prefab": {
"__id__": 17
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 70,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Bar",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
},
{
"__id__": 6
},
{
"__id__": 8
}
],
"_prefab": {
"__id__": 10
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -50,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 15
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6eSfVOfMxPjb1oQVZ1z5hY"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 0,
"b": 0,
"a": 255
},
"_spriteFrame": {
"__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "267GXyiYJB6qxCg6pLEfLQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_alignFlags": 8,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "160ZgDPIFBEZ5Msv1mYMvN"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "35OAlXyaBOBpLPAOKsDZHk"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 15
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ca65l+rt9Iz5il0zQDlfgE"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_spriteFrame": {
"__uuid__": "9fd900dd-221b-4f89-8f2c-fba34243c835@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "796J69Ia1LgrmmxsVBavZU"
},
{
"__type__": "cc.ProgressBar",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_barSprite": {
"__id__": 6
},
"_mode": 0,
"_totalLength": 100,
"_progress": 1,
"_reverse": false,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d2mnLSm7RHF7V3bD57PvC5"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "29DaYGvxpFo5cOAmvhl1Uj"
},
{
"__type__": "cc.Node",
"_name": "Nickname",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
}
],
"_prefab": {
"__id__": 21
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8blUJZ4nJKpKsLO2YpEChI"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "5adoggTLFPToeEZEIA7Yh3"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 25
}
],
"_prefab": {
"__id__": 27
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 98.845,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 24
},
"_contentSize": {
"__type__": "cc.Size",
"width": 110.72,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2a/IDEWZRPcb6AKU5/XAlD"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 26
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "nickname",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 24,
"_fontSize": 24,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "71ZjYMvjBES7FqZGSo1L00"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "03OAmogbVI5qDqTUJvplOC"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "43sIN2Al5OsJRxFqY+HJTV"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 31
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "48V6DZW5BPxIbiTPVjSL37"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "60xKi1fHZAl6spWUrSZzlZ"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "d565d84f-56c4-4aa3-831c-99db0a0d2390",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Player"
}
}

View File

@ -0,0 +1,275 @@
[
{
"__type__": "cc.Prefab",
"_name": "Shoot",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Shoot",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 4
},
{
"__id__": 6
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_prefab": {
"__id__": 13
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 330,
"y": -170,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 3
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3ayBLC6LxFz7oq0ZzKG3NX"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 100
},
"_spriteFrame": {
"__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "63G/jWiFtOYLM6CEMTwaZ5"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_alignFlags": 36,
"_target": null,
"_left": 0,
"_right": 50,
"_top": 0,
"_bottom": 50,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c6JBLKH2tKrZRkvm2uowFn"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"clickEvents": [
{
"__id__": 10
}
],
"_interactable": true,
"_transition": 3,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": {
"__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 0.9,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a6u7mmf6RAVatiJ06E5rQC"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "f4c4bvfd9NEo4jCKfQEAdq3",
"handler": "fire",
"customEventData": ""
},
{
"__type__": "f4c4bvfd9NEo4jCKfQEAdq3",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "38y7yDAz5Eko6zTvyWDBpA"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a02fCGCDhFvIHiQOXl0NzD"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "3f74a43c-479b-49f2-b883-2caca4f6682c",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Shoot"
}
}

View File

@ -0,0 +1,400 @@
[
{
"__type__": "cc.Prefab",
"_name": "Weapon1",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Weapon1",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 16
}
],
"_prefab": {
"__id__": 18
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Body",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
}
],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
}
],
"_prefab": {
"__id__": 15
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 40,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Anchor",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 4
}
],
"_active": true,
"_components": [
{
"__id__": 8
}
],
"_prefab": {
"__id__": 10
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 5,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Point",
"_objFlags": 0,
"_parent": {
"__id__": 3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 50,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "16I8wkBTxHDYkTYgfJ//ui"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bcdHkpaU9MH4VKR4D058ND"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "60vCWjti5CdYgFsCeZ6W60"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "51ov0p6adLqbnI7tTBZry9"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0128A1bzNNoZ3uKCYWPXCq"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "40OLWmzWlLCZT0MjYrvahg"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "55aZ32uotKq7UKJdoxzmU6"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "30Yu+lKAtH7JhdCwKmj4Uz"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b4iDImIiJBr625hlJDYo2e"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "0e6f92c7-02b3-408b-b756-2e0b4d4da977",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Weapon1"
}
}

View File

@ -0,0 +1,400 @@
[
{
"__type__": "cc.Prefab",
"_name": "Weapon2",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Weapon2",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 16
}
],
"_prefab": {
"__id__": 18
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Body",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
}
],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
}
],
"_prefab": {
"__id__": 15
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 50,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Anchor",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 4
}
],
"_active": true,
"_components": [
{
"__id__": 8
}
],
"_prefab": {
"__id__": 10
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 5,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Point",
"_objFlags": 0,
"_parent": {
"__id__": 3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 70,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7dUANOplxJlIsLcYO75CnZ"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "0eEUTI0i9ANLweIrxmY6dW"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "16I8wkBTxHDYkTYgfJ//ui"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bcdHkpaU9MH4VKR4D058ND"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0128A1bzNNoZ3uKCYWPXCq"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "d6c248fd-c31d-475f-948a-be099aca55d3@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "40OLWmzWlLCZT0MjYrvahg"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "55aZ32uotKq7UKJdoxzmU6"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "30Yu+lKAtH7JhdCwKmj4Uz"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b4iDImIiJBr625hlJDYo2e"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "e3554735-cb19-40d0-b167-0c607ce94392",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Weapon2"
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "d7f1d6a2-3440-4dbb-aab0-6217739e019d",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "36488b93-05fd-4191-af7b-297d24da5847",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.24",
"importer": "image",
"imported": true,
"uuid": "155ebd7e-9357-4155-acfc-fb5438af3d48",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "155ebd7e-9357-4155-acfc-fb5438af3d48@6c48a",
"displayName": "tile",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "155ebd7e-9357-4155-acfc-fb5438af3d48",
"isUuid": true,
"visible": false,
"minfilter": "nearest",
"magfilter": "nearest",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941",
"displayName": "tile",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 128,
"height": 128,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-64,
-64,
0,
64,
-64,
0,
-64,
64,
0,
64,
64,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
128,
128,
128,
0,
0,
128,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-64,
-64,
0
],
"maxPos": [
64,
64,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "155ebd7e-9357-4155-acfc-fb5438af3d48@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941"
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "a0a010bb-d1c0-4efa-a55f-ee60438f492e",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "fd66628c-bd95-4709-ab7d-a050731228e4",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.24",
"importer": "image",
"imported": true,
"uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597@6c48a",
"displayName": "bullet1 (1)",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "23c36f17-b533-41fc-ada4-4c3408ec5597",
"isUuid": true,
"visible": false,
"minfilter": "nearest",
"magfilter": "nearest",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941",
"displayName": "bullet1 (1)",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 32,
"height": 32,
"rawWidth": 32,
"rawHeight": 32,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-16,
-16,
0,
16,
-16,
0,
-16,
16,
0,
16,
16,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
32,
32,
32,
0,
0,
32,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-16,
-16,
0
],
"maxPos": [
16,
16,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "23c36f17-b533-41fc-ada4-4c3408ec5597@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941"
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "7bc2b36a-1f9e-4c27-b679-7f78f1b9d8ed",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.24",
"importer": "image",
"imported": true,
"uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675@6c48a",
"displayName": "bullet2 (1)",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "c15456b3-2df6-44f1-bb74-5fec2d554675",
"isUuid": true,
"visible": false,
"minfilter": "nearest",
"magfilter": "nearest",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675@f9941",
"displayName": "bullet2 (1)",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 32,
"height": 32,
"rawWidth": 32,
"rawHeight": 32,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-16,
-16,
0,
16,
-16,
0,
-16,
16,
0,
16,
16,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
32,
32,
32,
0,
0,
32,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-16,
-16,
0
],
"maxPos": [
16,
16,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "c15456b3-2df6-44f1-bb74-5fec2d554675@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "c15456b3-2df6-44f1-bb74-5fec2d554675@f9941"
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "fe6330d8-92bb-4d96-a162-30010e542247",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.24",
"importer": "image",
"imported": true,
"uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@6c48a",
"displayName": "explosion (1)",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f",
"isUuid": true,
"visible": false,
"minfilter": "nearest",
"magfilter": "nearest",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941",
"displayName": "explosion (1)",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 32,
"height": 32,
"rawWidth": 32,
"rawHeight": 32,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-16,
-16,
0,
16,
-16,
0,
-16,
16,
0,
16,
16,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
32,
32,
32,
0,
0,
32,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-16,
-16,
0
],
"maxPos": [
16,
16,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941"
}
}

Some files were not shown because too many files have changed in this diff Show More