Compare commits

...

7 Commits

Author SHA1 Message Date
k8w
5818604b4d revert gameManager 2021-12-28 23:26:15 +08:00
k8w
5a6ae0b679 GameStateManager 2021-12-28 22:45:50 +08:00
k8w
b9b6be0c7f airplane basic server 2021-12-28 21:57:18 +08:00
k8w
52618125e1 random 2021-12-28 15:23:18 +08:00
k8w
0f89b080cd GameSystem 2021-12-27 21:58:54 +08:00
k8w
1b7b1d229f airplane: update to 3.4.0 2021-12-27 19:29:11 +08:00
King Wang
92ec46ad65 init cocos-creator-airplane 2021-12-27 00:22:34 +08:00
377 changed files with 60999 additions and 0 deletions

View File

@ -0,0 +1 @@
TODO

View File

@ -0,0 +1,4 @@
node_modules
dist
.DS_STORE
*.meta

View File

@ -0,0 +1,11 @@
module.exports = {
require: [
'ts-node/register',
],
timeout: 999999,
exit: true,
spec: [
'./test/**/*.test.ts'
],
'preserve-symlinks': true
}

View File

@ -0,0 +1,30 @@
{
"configurations": [
{
"type": "node",
"request": "launch",
"name": "mocha current file",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"${file}"
],
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}"
},
{
"type": "node",
"request": "launch",
"name": "ts-node current file",
"protocol": "inspector",
"args": [
"${relativeFile}"
],
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"-r",
"ts-node/register"
],
"internalConsoleOptions": "openOnSessionStart"
}
]
}

View File

@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}

View File

@ -0,0 +1,30 @@
FROM node
# 使用淘宝 NPM 镜像(国内机器构建推荐启用)
# RUN npm config set registry https://registry.npm.taobao.org/
# npm install
ADD package*.json /src/
WORKDIR /src
RUN npm i
# build
ADD . /src
RUN npm run build
# clean
RUN npm prune --production
# move
RUN rm -rf /app \
&& mv dist /app \
&& mv node_modules /app/ \
&& rm -rf /src
# ENV
ENV NODE_ENV production
EXPOSE 3000
WORKDIR /app
CMD node index.js

View File

@ -0,0 +1,31 @@
# TSRPC Server
## Usage
### Local dev server
Dev server would restart automatically when code changed.
```
npm run dev
```
### Build
```
npm run build
```
### Generate API document
Generate API document in swagger/openapi and markdown format.
```shell
npm run doc
```
### Run unit Test
Execute `npm run dev` first, then execute:
```
npm run test
```
---

View File

@ -0,0 +1,24 @@
{
"name": "backend-.",
"version": "0.1.0",
"main": "index.js",
"private": true,
"scripts": {
"dev": "tsrpc-cli dev",
"build": "tsrpc-cli build",
"doc": "tsrpc-cli doc",
"test": "mocha test/**/*.test.ts"
},
"devDependencies": {
"@types/mocha": "^8.2.3",
"@types/node": "^15.14.9",
"mocha": "^9.1.3",
"onchange": "^7.1.0",
"ts-node": "^10.4.0",
"tsrpc-cli": "^2.3.1",
"typescript": "^4.5.4"
},
"dependencies": {
"tsrpc": "^3.1.4"
}
}

View File

@ -0,0 +1,17 @@
import { ApiCall } from "tsrpc";
import { ReqLogin, ResLogin } from "../shared/protocols/PtlLogin";
let nextPlayerId = 1;
export async function ApiLogin(call: ApiCall<ReqLogin, ResLogin>) {
let playerId = nextPlayerId++;
call.conn.currentUser = {
id: playerId,
nickname: call.req.nickname
}
call.succ({
currentUser: call.conn.currentUser
})
}

View File

@ -0,0 +1,7 @@
import { ApiCall } from "tsrpc";
import { ReqCreateRoom, ResCreateRoom } from "../../shared/protocols/room/PtlCreateRoom";
export async function ApiCreateRoom(call: ApiCall<ReqCreateRoom, ResCreateRoom>) {
// TODO
call.error('API Not Implemented');
}

View File

@ -0,0 +1,7 @@
import { ApiCall } from "tsrpc";
import { ReqGetRoomList, ResGetRoomList } from "../../shared/protocols/room/PtlGetRoomList";
export async function ApiGetRoomList(call: ApiCall<ReqGetRoomList, ResGetRoomList>) {
// TODO
call.error('API Not Implemented');
}

View File

@ -0,0 +1,17 @@
import { ApiCallWs } from "tsrpc";
import { Room } from "../../models/Room";
import { ReqJoinRoom, ResJoinRoom } from "../../shared/protocols/room/PtlJoinRoom";
// TEST
let room = new Room(123);
export async function ApiJoinRoom(call: ApiCallWs<ReqJoinRoom, ResJoinRoom>) {
let op = room.join(call.conn);
if (!op.isSucc) {
return call.error(op.errMsg);
}
call.succ({
roomState: room.state
});
}

View File

@ -0,0 +1,11 @@
import { ApiCall } from "tsrpc";
import { ReqSetReady, ResSetReady } from "../../shared/protocols/room/PtlSetReady";
export async function ApiSetReady(call: ApiCall<ReqSetReady, ResSetReady>) {
if (!call.conn.room) {
return call.error('您还未加入房间')
}
call.conn.room.setReady(call.conn.currentUser.id, call.req.isReady);
call.succ({})
}

View File

@ -0,0 +1,36 @@
import 'k8w-extend-native';
import * as path from "path";
import { WsServer } from "tsrpc";
import { Room } from './models/Room';
import { serviceProto } from './shared/protocols/serviceProto';
import { CurrentUser } from './shared/types/CurrentUser';
// Create the Server
export const server = new WsServer(serviceProto, {
port: 3000,
// Remove this to use binary mode (remove from the client too)
json: true
});
// Initialize before server start
async function init() {
await server.autoImplementApi(path.resolve(__dirname, 'api'));
// TODO
// Prepare something... (e.g. connect the db)
};
// Entry function
async function main() {
await init();
await server.start();
}
main();
// 扩展 Connection 字段
declare module 'tsrpc' {
export interface BaseConnection {
currentUser: CurrentUser,
room?: Room,
}
}

View File

@ -0,0 +1,188 @@
import { MsgCallWs, uint, WsConnection } from "tsrpc";
import { server } from "..";
import { gameConfig } from "../shared/game/gameConfig";
import { GameSystemInput } from "../shared/game/GameSystemInput";
import { GameSystemState } from "../shared/game/GameSystemState";
import { MsgGameInput } from "../shared/protocols/game/client/MsgGameInput";
import { ServiceType } from "../shared/protocols/serviceProto";
import { RoomState } from "../shared/types/RoomState";
const MAX_ROOM_USER = 2;
/**
* - -
*/
export class Room {
// 房间信息
state: RoomState;
conns: WsConnection<ServiceType>[] = [];
constructor(roomId: uint) {
this.state = {
id: roomId,
players: [],
status: 'wait'
}
}
// #region Room Control
// 加入房间
join(conn: WsConnection<ServiceType>): { isSucc: true } | { isSucc: false, errMsg: string } {
if (this.state.status !== 'wait') {
return { isSucc: false, errMsg: '该房间游戏已开始' }
}
if (this.conns.length >= MAX_ROOM_USER) {
return { isSucc: false, errMsg: '房间已满员' }
}
this.conns.push(conn);
this.state.players.push({ ...conn.currentUser, isReady: false });
conn.room = this;
this._syncRoomState();
return { isSucc: true };
}
private _timerStartGame?: ReturnType<typeof setTimeout>;
setReady(playerId: number, isReady: boolean) {
if (this.state.status !== 'wait') {
return;
}
let player = this.state.players.find(v => v.id === playerId);
if (player) {
player.isReady = isReady;
}
// 如果人满了且所有人都准备了5 秒后开始游戏
if (this.state.players.length >= MAX_ROOM_USER && this.state.players.every(v => v.isReady)) {
this.state.status = 'ready';
this._syncRoomState();
this._timerStartGame = setTimeout(() => {
this._timerStartGame = undefined;
this.startGame();
}, 5000);
}
}
// 离开房间
leave(conn: WsConnection<ServiceType>) {
conn.room = undefined;
this.conns.removeOne(v => v === conn);
this.state.players.removeOne(v => v.id === conn.currentUser.id);
// 由于有人秒退,游戏无法正常开始
if (this._timerStartGame && this.conns.length < MAX_ROOM_USER) {
this.state.status = 'wait';
clearTimeout(this._timerStartGame);
this._timerStartGame = undefined;
}
this._syncRoomState();
}
private _syncRoomState() {
server.broadcastMsg('room/server/UpdateRoomState', {
state: this.state
}, this.conns)
}
// #endregion
// #region Game
private _lastSn: { [playerId: number]: number | undefined } = {};
private _lastFrameIndex: number = 0;
private _lastSyncTime!: number;
private _gameOveredUids: number[] = [];
async startGame() {
this.conns.forEach(v => {
v.listenMsg('game/client/GameInput', (call: MsgCallWs<MsgGameInput, ServiceType>) => {
this._lastSn[call.conn.currentUser.id] = call.msg.sn;
this._syncInputs(call.msg.inputs.map(v => ({ ...v, playerId: call.conn.currentUser.id })))
})
});
// 更新房间状态
this.state.status = 'start';
this._syncRoomState();
// 生成游戏初始状态
let initGameState: GameSystemState = {
now: 0,
players: this.conns.map(v => ({
id: v.currentUser.id,
nickname: v.currentUser.nickname,
score: 0,
life: gameConfig.player.totalLife,
currentBulletType: 'M',
pos: { x: 0, y: 100 },
bullets: [],
nextId: {
bullet: 0
}
})),
enemies: [],
fightIcons: [],
// ID 生成器
nextId: {
enemy: 0,
fightIcon: 0
},
// 上次创建敌机的时间
lastCreateEnemyTime: 3000
};
this._lastSn = {};
this._lastSyncTime = Date.now();
this._lastFrameIndex = 0;
// 广播游戏初始状态
server.broadcastMsg('game/server/GameStart', {
frameIndex: this._lastFrameIndex,
gameState: initGameState
}, this.conns);
}
// 收到输入,立即同步给所有人
private _syncInputs(inputs: GameSystemInput[]) {
// 增加时间流逝
let now = process.uptime() * 1000;
inputs.unshift({
type: 'TimePast',
dt: now - this._lastSyncTime
});
this._lastSyncTime = now;
// 把输入广播给所有用户
this.conns.forEach(v => {
v.sendMsg('game/server/ServerFrame', {
frameIndex: this._lastFrameIndex,
inputs: inputs,
lastSn: this._lastSn[v.currentUser.id!]
})
});
}
async gameOver(uid: number) {
if (this.state.status !== 'start' || this._gameOveredUids.includes(uid)) {
return;
}
this._gameOveredUids.push(uid);
// 所有人都 GameOverGame 真的 Over
if (this.conns.every(v => this._gameOveredUids.includes(v.currentUser.id))) {
this.conns.forEach(v => {
v.unlistenMsgAll('game/client/GameInput');
});
this.state.status = 'wait';
this._syncRoomState();
}
}
// #endregion
}

View File

@ -0,0 +1,175 @@
import { gameConfig } from "./gameConfig";
import { GameSystemEvent } from "./GameSystemEvent";
import { GameSystemInput } from "./GameSystemInput";
import { EnemyState, EnemyType, GameSystemState } from "./GameSystemState";
/**
*
*/
export class GameSystem {
// 当前状态
private _state!: GameSystemState;
get state(): Readonly<GameSystemState> {
return this._state;
}
set state(state: GameSystemState) {
this._state = state;
}
constructor(state: GameSystemState) {
this.state = state;
}
// 应用输入,计算状态变更
applyInput(input: GameSystemInput) {
switch (input.type) {
// 击中敌机
case 'PlayerHitEnemy': {
let enemyIndex = this.state.enemies.findIndex(v => v.id === input.enemyId);
let player = this.state.players.find(v => v.id === input.playerId);
if (player && enemyIndex > -1) {
this.state.enemies.splice(enemyIndex, 1);
// 得 1 分
player.score += 1;
this.emit('enemyDie', { enemyId: input.enemyId })
}
break;
}
// 吃到子弹道具
case 'PlayerHitFightIcon': {
let fightIconIndex = this.state.fightIcons.findIndex(v => v.id === input.fightIconId);
let player = this.state.players.find(v => v.id === input.playerId);
if (player && fightIconIndex > -1) {
let fightIcon = this.state.fightIcons[fightIconIndex];
this.state.fightIcons.splice(fightIconIndex, 1);
player.currentBulletType = fightIcon.type;
}
break;
}
// 玩家受到伤害
case 'PlayerHurt': {
let player = this.state.players.find(v => v.id === input.playerId);
if (player) {
player.life = Math.max(0, player.life - input.hurtLife);
if (player.life === 0) {
this.state.players.removeOne(v => v.id === input.playerId);
this.emit('playerDie', { playerId: player.id })
}
}
break;
}
// 移动并攻击
case 'PlayerMove': {
let player = this.state.players.find(v => v.id === input.playerId);
if (player) {
// Update Pos
player.pos.x += input.offset.x;
player.pos.y += input.offset.y;
// Update Bullets
player.bullets.push(...input.createBullets);
}
break;
}
// 子弹碰撞,抵消
case 'BulletHit': {
let player = this.state.players.find(v => v.id === input.playerId);
let enemy = this.state.enemies.find(v => v.id === input.enemyId);
if (player && enemy) {
player.bullets.removeOne(v => v.id === input.playerBulletId);
enemy.bullets.removeOne(v => v.id === input.enemyBulletId);
}
break;
}
// 时间流逝
case 'TimePast': {
// 更新己方子弹位置
this.state.players.forEach(player => {
player.bullets.forEach(bullet => {
bullet.pos.x = bullet.init.pos.x + bullet.init.direction.x * gameConfig.player.bulletSpeed * (this.state.now - bullet.init.time);
bullet.pos.y = bullet.init.pos.y + bullet.init.direction.y * gameConfig.player.bulletSpeed * (this.state.now - bullet.init.time);
})
})
// 更新敌机
this.state.enemies.forEach(enemy => {
// 更新敌机位置
const enemyTime = this.state.now - enemy.init.time;
enemy.pos.y = enemy.init.pos.y - gameConfig.enemy.speed[enemy.type] * enemyTime;
// 更新敌机子弹位置
enemy.bullets.forEach(bullet => {
bullet.pos.y = bullet.init.pos.y - gameConfig.enemy.bulletSpeed * (this.state.now - bullet.init.time);
})
// 敌机发射子弹
if ((this.state.now - enemy.lastBulletTime) >= gameConfig.enemy.bulletGapTime) {
enemy.bullets.push({
id: enemy.nextId.bullet++,
pos: { ...enemy.pos },
init: {
time: this.state.now,
pos: { ...enemy.pos },
}
})
enemy.lastBulletTime = this.state.now;
}
});
// 创建新敌机
this._createEnemies();
break;
}
}
}
private _createEnemies() {
if (this.state.now < this.state.lastCreateEnemyTime + gameConfig.enemy.bornY) {
return;
}
let time = this.state.now - (this.state.now % gameConfig.enemy.bornGapTime);
let pos = { x: 0, y: gameConfig.enemy.bornY };
let enemy: EnemyState = {
id: this.state.nextId.enemy++,
// 敌机类型
type: EnemyType.E1,
pos: { ...pos },
init: {
time: time,
pos: { ...pos },
},
bullets: [],
// 初次创建敌机,按 bulletDelayTime 倒推 lastBulletTime
lastBulletTime: time + gameConfig.enemy.bulletDelayTime - gameConfig.enemy.bulletGapTime,
nextId: {
bullet: 0
}
}
this.state.enemies.push(enemy);
}
// 简易的事件侦听器
private _eventHandlers: { [key: string]: Function[] } = {};
on<T extends keyof GameSystemEvent>(eventName: T, handler: (e: GameSystemEvent[T]) => void): (e: GameSystemEvent[T]) => void {
if (!this._eventHandlers[eventName]) {
this._eventHandlers[eventName] = [];
}
this._eventHandlers[eventName].push(handler);
return handler;
}
off<T extends keyof GameSystemEvent>(eventName: T, handler?: (e: GameSystemEvent[T]) => void): void {
if (!handler) {
this._eventHandlers[eventName] = [];
return;
}
this._eventHandlers[eventName]?.removeOne(v => v === handler);
}
emit<T extends keyof GameSystemEvent>(eventName: T, eventData: GameSystemEvent[T]) {
this._eventHandlers[eventName]?.forEach(v => v(eventData));
}
}

View File

@ -0,0 +1,10 @@
import { uint } from "tsrpc-proto";
export interface GameSystemEvent {
playerDie: {
playerId: uint
},
enemyDie: {
enemyId: uint
}
}

View File

@ -0,0 +1,50 @@
import { uint } from "tsrpc-proto";
import { PlayerState } from "./GameSystemState";
// 移动并攻击
export interface PlayerMove {
type: 'PlayerMove',
playerId: uint,
offset: { x: number, y: number },
createBullets: PlayerState['bullets']
}
// 命中敌机
export interface PlayerHitEnemy {
type: 'PlayerHitEnemy',
playerId: uint,
enemyId: uint
}
// 吃到 FightIcon
export interface PlayerHitFightIcon {
type: 'PlayerHitFightIcon',
playerId: uint,
fightIconId: uint
}
// 被敌机击中
export interface PlayerHurt {
type: 'PlayerHurt',
playerId: uint,
// 伤害血量
hurtLife: number,
}
// 子弹互相碰撞,双双消失
export interface BulletHit {
type: 'BulletHit',
playerId: uint,
playerBulletId: uint,
enemyId: uint,
enemyBulletId: uint
}
// 时间流逝
export interface TimePast {
type: 'TimePast',
dt: number
}
// 输入定义
export type GameSystemInput = PlayerMove | PlayerHitEnemy | PlayerHitFightIcon | PlayerHurt | BulletHit | TimePast;

View File

@ -0,0 +1,102 @@
import { uint } from "tsrpc-proto";
// 坐标系X-Y 原点在中间下方
/*
[ ] [ ] [ ]
[ ] [ ] [ ]
y
[ ] [x] [ ] x
*/
export interface GameSystemState {
// 游戏时间
now: number,
// 场景状态
players: PlayerState[],
enemies: EnemyState[],
fightIcons: FightIconState[],
// ID 生成器
nextId: {
enemy: uint,
fightIcon: uint
},
// 上次创建敌机的时间
lastCreateEnemyTime: number,
}
// 玩家
export interface PlayerState {
id: uint,
nickname: string,
// 得分
score: number,
// 生命值
life: number,
// 当前子弹
currentBulletType: PlayerBulletType,
// 位置
pos: { x: number, y: number },
bullets: {
id: uint,
type: PlayerBulletType,
pos: { x: number, y: number },
// 初始状态
init: {
time: number,
pos: { x: number, y: number },
direction: { x: number, y: number }
}
}[],
nextId: {
bullet: uint
}
}
export type PlayerBulletType = 'M' | 'H' | 'S';
// 敌机
export interface EnemyState {
id: uint,
// 敌机类型
type: EnemyType,
pos: { x: number, y: number },
init: {
time: number,
pos: { x: number, y: number },
}
bullets: {
id: uint,
pos: { x: number, y: number },
// 初始状态
init: {
time: number,
// 目前只能向下飞
pos: { x: number, y: number },
}
}[],
// 上次发射子弹的时间
lastBulletTime: number,
nextId: {
bullet: uint
}
}
export enum EnemyType {
E1,
E2
};
// 子弹图标
export interface FightIconState {
id: uint,
type: PlayerBulletType,
init: {
time: number,
pos: { x: number, y: number }
}
}

View File

@ -0,0 +1,7 @@
export class GameSystemUtil {
static getPlayerBulletPos() { }
static getEnemyBulletPos() { }
}

View File

@ -0,0 +1,25 @@
import { EnemyType } from "./GameSystemState";
export const gameConfig = {
enemy: {
bulletSpeed: 20,
// 第一次发射子弹的延迟时间
bulletDelayTime: 1500,
// 每次发射子弹的间隔
bulletGapTime: 500,
// 出现位置Y轴
bornY: 1800,
// 敌机出现时间间隔(毫秒)
bornGapTime: 1000,
// 敌机速度
speed: {
[EnemyType.E1]: 10,
[EnemyType.E2]: 20,
}
},
player: {
bulletSpeed: 10,
totalLife: 10,
},
}

View File

@ -0,0 +1,14 @@
import { CurrentUser } from "../types/CurrentUser";
import { BaseConf, BaseRequest, BaseResponse } from "./base";
export interface ReqLogin extends BaseRequest {
nickname: string
}
export interface ResLogin extends BaseResponse {
currentUser: CurrentUser
}
export const conf: BaseConf = {
}

View File

@ -0,0 +1,15 @@
export interface BaseRequest {
}
export interface BaseResponse {
}
export interface BaseConf {
}
export interface BaseMessage {
}

View File

@ -0,0 +1,13 @@
import { BulletHit, PlayerHitEnemy, PlayerHitFightIcon, PlayerHurt, PlayerMove } from "../../../game/GameSystemInput";
/** 发送自己的输入 */
export interface MsgGameInput {
sn: number,
inputs: ClientInput[]
}
export type ClientInput = Omit<PlayerMove, 'playerId'>
| Omit<PlayerHitEnemy, 'playerId'>
| Omit<PlayerHitFightIcon, 'playerId'>
| Omit<PlayerHurt, 'playerId'>
| Omit<BulletHit, 'playerId'>;

View File

@ -0,0 +1,5 @@
export interface MsgGameOver {
}
// export const conf = {}

View File

@ -0,0 +1,7 @@
import { uint } from "tsrpc-proto";
import { GameSystemState } from "../../../game/GameSystemState";
export interface MsgGameStart {
frameIndex: uint,
gameState: GameSystemState
}

View File

@ -0,0 +1,13 @@
import { uint } from "tsrpc-proto";
import { GameSystemInput } from "../../../game/GameSystemInput";
/**
* 广
*
*/
export interface MsgServerFrame {
frameIndex: uint,
inputs: GameSystemInput[],
/** 当前用户提交的,经服务端确认的最后一条输入的 SN */
lastSn?: number
}

View File

@ -0,0 +1,14 @@
import { uint } from "tsrpc-proto";
import { BaseConf, BaseRequest, BaseResponse } from "../base";
export interface ReqCreateRoom extends BaseRequest {
}
export interface ResCreateRoom extends BaseResponse {
roomId: uint
}
export const conf: BaseConf = {
}

View File

@ -0,0 +1,13 @@
import { BaseRequest, BaseResponse, BaseConf } from "../base";
export interface ReqGetRoomList extends BaseRequest {
}
export interface ResGetRoomList extends BaseResponse {
}
export const conf: BaseConf = {
}

View File

@ -0,0 +1,15 @@
import { uint } from "tsrpc-proto";
import { RoomState } from "../../types/RoomState";
import { BaseConf, BaseRequest, BaseResponse } from "../base";
export interface ReqJoinRoom extends BaseRequest {
roomId: uint;
}
export interface ResJoinRoom extends BaseResponse {
roomState: RoomState;
}
export const conf: BaseConf = {
}

View File

@ -0,0 +1,14 @@
import { BaseConf, BaseRequest, BaseResponse } from "../base";
/** 准备 */
export interface ReqSetReady extends BaseRequest {
isReady: boolean
}
export interface ResSetReady extends BaseResponse {
}
export const conf: BaseConf = {
}

View File

@ -0,0 +1,7 @@
import { RoomState } from "../../../types/RoomState";
export interface MsgUpdateRoomState {
state: RoomState
}
// export const conf = {}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
import { uint } from "tsrpc-proto";
export interface CurrentUser {
id: uint,
nickname: string
}

View File

@ -0,0 +1,7 @@
import { uint } from "tsrpc-proto";
export interface RoomState {
id: uint;
players: { id: uint, nickname: string, isReady: boolean }[];
status: 'wait' | 'ready' | 'start';
}

View File

@ -0,0 +1,40 @@
import assert from 'assert';
import { TsrpcError, WsClient } from 'tsrpc';
import { serviceProto } from '../../src/shared/protocols/serviceProto';
// 1. EXECUTE `npm run dev` TO START A LOCAL DEV SERVER
// 2. EXECUTE `npm test` TO START UNIT TEST
describe('ApiSend', function () {
let client = new WsClient(serviceProto, {
server: 'ws://127.0.0.1:3000',
json: true,
logger: console
});
before(async function () {
let res = await client.connect();
assert.strictEqual(res.isSucc, true, 'Failed to connect to server, have you executed `npm run dev` already?');
})
it('Success', async function () {
let ret = await client.callApi('Send', {
content: 'Test'
});
assert.ok(ret.isSucc)
});
it('Check content is empty', async function () {
let ret = await client.callApi('Send', {
content: ''
});
assert.deepStrictEqual(ret, {
isSucc: false,
err: new TsrpcError('Content is empty')
});
})
after(async function () {
await client.disconnect();
})
})

View File

@ -0,0 +1,15 @@
{
"compilerOptions": {
"lib": [
"es2018"
],
"module": "commonjs",
"target": "es2018",
"outDir": "dist",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
}
}

View File

@ -0,0 +1,18 @@
{
"compilerOptions": {
"lib": [
"es2018"
],
"module": "commonjs",
"target": "es2018",
"outDir": "dist",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
},
"include": [
"src"
]
}

View File

@ -0,0 +1,39 @@
import { CodeTemplate, TsrpcConfig } from 'tsrpc-cli';
const tsrpcConf: TsrpcConfig = {
// Generate ServiceProto
proto: [
{
ptlDir: 'src/shared/protocols', // Protocol dir
output: 'src/shared/protocols/serviceProto.ts', // Path for generated ServiceProto
apiDir: 'src/api', // API dir
docDir: 'docs', // API documents dir
ptlTemplate: CodeTemplate.getExtendedPtl(),
// msgTemplate: CodeTemplate.getExtendedMsg(),
}
],
// Sync shared code
sync: [
{
from: 'src/shared',
to: '../frontend/assets/script/shared',
type: 'symlink' // Change this to 'copy' if your environment not support symlink
}
],
// Dev server
dev: {
autoProto: true, // Auto regenerate proto
autoSync: true, // Auto sync when file changed
autoApi: true, // Auto create API when ServiceProto updated
watch: 'src', // Restart dev server when these files changed
entry: 'src/index.ts', // Dev server command: node -r ts-node/register {entry}
},
// Build config
build: {
autoProto: true, // Auto generate proto before build
autoSync: true, // Auto sync before build
autoApi: true, // Auto generate API before build
outDir: 'dist', // Clean this dir before build
}
}
export default tsrpcConf;

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 @@
import 'k8w-extend-native';

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "462c5922-0190-42df-a20e-963ccd552d2f",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "d619bb02-76a1-4ace-826f-b3b44149e185",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,2 @@
# 资源

View File

@ -0,0 +1,12 @@
{
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "583285f2-198b-4832-9448-8623c52bc0d9",
"files": [
".md",
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "89348472-79cf-4d25-8ec0-197061fb06ca",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,2 @@
# 动画资源

View File

@ -0,0 +1,12 @@
{
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "ef0a3407-a57b-4139-a3c9-f18316e4e3bc",
"files": [
".md",
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "5ae7f4e4-406f-442f-b4ce-dd70729f6966",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,35 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": 0,
"_defines": [
{
"USE_TEXTURE": true
}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "e64b19ec-c086-4357-9571-eb8e85ced044@6c48a",
"__expectedType__": "cc.Texture2D"
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "2d485d8f-e87e-484b-8f67-765dd72f8a18",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "812c86f6-076b-41e0-993c-b0a630ede81d",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,2 @@
# 特效资源

View File

@ -0,0 +1,12 @@
{
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "5d738d84-231b-4e86-8ea0-b0cab73e1cba",
"files": [
".md",
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "739cc48a-9c5d-4378-b441-2c44d3f6bcf6",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,36 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": "3",
"_defines": [
{
"USE_INSTANCING": true,
"USE_TEXTURE": true
}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "06612749-2f06-4d0e-ad24-dc72818d0166@6c48a",
"__expectedType__": "cc.Texture2D"
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "ba9fb8f3-b662-4d9e-adcf-57bab71eeb06",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1,40 @@
{
"ver": "1.0.22",
"importer": "image",
"imported": true,
"uuid": "06612749-2f06-4d0e-ad24-dc72818d0166",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "06612749-2f06-4d0e-ad24-dc72818d0166@6c48a",
"displayName": "bullet01",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "06612749-2f06-4d0e-ad24-dc72818d0166"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "texture",
"redirect": "06612749-2f06-4d0e-ad24-dc72818d0166@6c48a"
}
}

View File

@ -0,0 +1,287 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "bullet01",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 7
},
{
"__id__": 8
},
{
"__id__": 10
},
{
"__id__": 12
}
],
"_prefab": {
"__id__": 14
},
"_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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bullet011",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 6
},
"_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.07,
"y": 0.07,
"z": 0.07
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.MeshRenderer",
"_name": "Plane<ModelComponent>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_materials": [
{
"__uuid__": "ba9fb8f3-b662-4d9e-adcf-57bab71eeb06",
"__expectedType__": "cc.Material"
}
],
"_visFlags": 0,
"lightmapSettings": {
"__id__": 5
},
"_mesh": {
"__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@2e76e",
"__expectedType__": "cc.Mesh"
},
"_shadowCastingMode": 0,
"_shadowReceivingMode": 1,
"_enableMorph": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f9yjnY1aNIRbN0AmUkbAhW"
},
{
"__type__": "cc.ModelLightmapSettings",
"texture": null,
"uvParam": {
"__type__": "cc.Vec4",
"x": 0,
"y": 0,
"z": 0,
"w": 0
},
"_bakeable": false,
"_castShadow": false,
"_receiveShadow": false,
"_recieveShadow": false,
"_lightmapSize": 64
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "1aK71Ej9lBgbNZXYBXTe1z"
},
{
"__type__": "35d6cutJHxL8p5S82gIk1i7",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": null,
"_id": ""
},
{
"__type__": "cc.BoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_material": null,
"_isTrigger": true,
"_center": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_size": {
"__type__": "cc.Vec3",
"x": 0.061,
"y": 0.01,
"z": 0.235
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3af6uH8ERG84w38N9cGl7q"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"_group": 2,
"_type": 1,
"_mass": 1,
"_allowSleep": true,
"_linearDamping": 0.1,
"_angularDamping": 0.1,
"_useGravity": false,
"_linearFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_angularFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a8CM9G3tVE27aI+Hi7DXIH"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 13
},
"_clip": {
"__uuid__": "4b9ccca5-e5a5-4aee-ba7a-df01807f7c7d",
"__expectedType__": "cc.AudioClip"
},
"_loop": false,
"_playOnAwake": true,
"_volume": 0.56,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "17hkKHeXlCOLZYVzugDVpI"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bbNoRdlhpGz7e9EyhGCLbP"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.35",
"importer": "prefab",
"imported": true,
"uuid": "98934907-c269-49f0-b9c6-9ae428c22e6d",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "bullet01"
}
}

View File

@ -0,0 +1,36 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": "3",
"_defines": [
{
"USE_INSTANCING": true,
"USE_TEXTURE": true
}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "acb2ca2c-2894-4f38-8f54-11bc96b82c86@6c48a",
"__expectedType__": "cc.Texture2D"
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "f0f39b29-cff6-4ca7-82ad-0b9a4da833e0",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -0,0 +1,40 @@
{
"ver": "1.0.22",
"importer": "image",
"imported": true,
"uuid": "acb2ca2c-2894-4f38-8f54-11bc96b82c86",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "acb2ca2c-2894-4f38-8f54-11bc96b82c86@6c48a",
"displayName": "bullet02",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "acb2ca2c-2894-4f38-8f54-11bc96b82c86"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "texture",
"redirect": "acb2ca2c-2894-4f38-8f54-11bc96b82c86@6c48a"
}
}

View File

@ -0,0 +1,328 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "bullet02",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
},
{
"__id__": 13
},
{
"__id__": 15
}
],
"_prefab": {
"__id__": 17
},
"_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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bullet021",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__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": 0.07,
"y": 0.07,
"z": 0.07
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.MeshRenderer",
"_name": "Plane<ModelComponent>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_materials": [
{
"__uuid__": "f0f39b29-cff6-4ca7-82ad-0b9a4da833e0",
"__expectedType__": "cc.Material"
}
],
"_visFlags": 0,
"lightmapSettings": {
"__id__": 5
},
"_mesh": {
"__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@2e76e",
"__expectedType__": "cc.Mesh"
},
"_shadowCastingMode": 0,
"_shadowReceivingMode": 1,
"_enableMorph": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8b3vKyvbdPba/TIkxWXnTv"
},
{
"__type__": "cc.ModelLightmapSettings",
"texture": null,
"uvParam": {
"__type__": "cc.Vec4",
"x": 0,
"y": 0,
"z": 0,
"w": 0
},
"_bakeable": false,
"_castShadow": false,
"_receiveShadow": false,
"_recieveShadow": false,
"_lightmapSize": 64
},
{
"__type__": "cc.BoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_material": null,
"_isTrigger": true,
"_center": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_size": {
"__type__": "cc.Vec3",
"x": 1.068,
"y": 0.496,
"z": 4.231
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "05IEWAjm5Fo6Rbh3UAMw2i"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "66Blx0OfZE3oFxClek2htf"
},
{
"__type__": "cc.BoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_material": null,
"_isTrigger": true,
"_center": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_size": {
"__type__": "cc.Vec3",
"x": 0.061,
"y": 0.01,
"z": 0.235
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3af6uH8ERG84w38N9cGl7q"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_group": 2,
"_type": 1,
"_mass": 1,
"_allowSleep": true,
"_linearDamping": 0.1,
"_angularDamping": 0.1,
"_useGravity": false,
"_linearFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_angularFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a8CM9G3tVE27aI+Hi7DXIH"
},
{
"__type__": "35d6cutJHxL8p5S82gIk1i7",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "03EKjBwTxKbJropLGwocTw"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_clip": {
"__uuid__": "4b9ccca5-e5a5-4aee-ba7a-df01807f7c7d",
"__expectedType__": "cc.AudioClip"
},
"_loop": false,
"_playOnAwake": true,
"_volume": 0.56,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "408gGgXXlD9IC/M+LF6/vb"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "819P1sONxO2rF+1VVHeT97"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.35",
"importer": "prefab",
"imported": true,
"uuid": "34afb445-954c-4a10-a3a9-7a764d8b69f3",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "bullet02"
}
}

View File

@ -0,0 +1,36 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": "3",
"_defines": [
{
"USE_INSTANCING": true,
"USE_TEXTURE": true
}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "d5197b28-de9e-40a2-b472-fad147e5e67b@6c48a",
"__expectedType__": "cc.Texture2D"
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "8268f284-a0a7-4974-bfc8-02864e52d692",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -0,0 +1,40 @@
{
"ver": "1.0.22",
"importer": "image",
"imported": true,
"uuid": "d5197b28-de9e-40a2-b472-fad147e5e67b",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "d5197b28-de9e-40a2-b472-fad147e5e67b@6c48a",
"displayName": "bullet03",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "d5197b28-de9e-40a2-b472-fad147e5e67b"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "texture",
"redirect": "d5197b28-de9e-40a2-b472-fad147e5e67b@6c48a"
}
}

View File

@ -0,0 +1,296 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "bullet03",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 7
},
{
"__id__": 9
},
{
"__id__": 11
},
{
"__id__": 13
}
],
"_prefab": {
"__id__": 15
},
"_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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bullet031",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 6
},
"_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.07,
"y": 0.07,
"z": 0.07
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.MeshRenderer",
"_name": "Plane<ModelComponent>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_materials": [
{
"__uuid__": "8268f284-a0a7-4974-bfc8-02864e52d692",
"__expectedType__": "cc.Material"
}
],
"_visFlags": 0,
"lightmapSettings": {
"__id__": 5
},
"_mesh": {
"__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@2e76e",
"__expectedType__": "cc.Mesh"
},
"_shadowCastingMode": 0,
"_shadowReceivingMode": 1,
"_enableMorph": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f2OZmmS4FPub6zbjUzdRYz"
},
{
"__type__": "cc.ModelLightmapSettings",
"texture": null,
"uvParam": {
"__type__": "cc.Vec4",
"x": 0,
"y": 0,
"z": 0,
"w": 0
},
"_bakeable": false,
"_castShadow": false,
"_receiveShadow": false,
"_recieveShadow": false,
"_lightmapSize": 64
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "d3CikuIXdLOYahvqSfQB89"
},
{
"__type__": "cc.BoxCollider",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_material": null,
"_isTrigger": true,
"_center": {
"__type__": "cc.Vec3",
"x": 0.01,
"y": 0,
"z": 0.01
},
"_size": {
"__type__": "cc.Vec3",
"x": 0.198,
"y": 0.01,
"z": 0.196
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3af6uH8ERG84w38N9cGl7q"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_group": 2,
"_type": 1,
"_mass": 1,
"_allowSleep": true,
"_linearDamping": 0.1,
"_angularDamping": 0.1,
"_useGravity": false,
"_linearFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_angularFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a8CM9G3tVE27aI+Hi7DXIH"
},
{
"__type__": "35d6cutJHxL8p5S82gIk1i7",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6d2lAAEw9E2Y6bknBZN1G4"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_clip": {
"__uuid__": "53b7ebc9-ef44-43be-b01d-26acb8d571c3",
"__expectedType__": "cc.AudioClip"
},
"_loop": false,
"_playOnAwake": true,
"_volume": 0.56,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4f3wtpKxdEvZAxG++gKM00"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "77yc92h6hPGaTn3QChfzMq"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.35",
"importer": "prefab",
"imported": true,
"uuid": "99d98960-faac-40dc-82a7-9495d1a15132",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "bullet03"
}
}

View File

@ -0,0 +1,36 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": "3",
"_defines": [
{
"USE_INSTANCING": true,
"USE_TEXTURE": true
}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "4f1baa29-f5c2-4909-8c28-06ca2af96fd3@6c48a",
"__expectedType__": "cc.Texture2D"
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "2e1542f3-86c8-4d9b-9afb-afc211b1c406",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1,40 @@
{
"ver": "1.0.22",
"importer": "image",
"imported": true,
"uuid": "4f1baa29-f5c2-4909-8c28-06ca2af96fd3",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "4f1baa29-f5c2-4909-8c28-06ca2af96fd3@6c48a",
"displayName": "bullet04",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "4f1baa29-f5c2-4909-8c28-06ca2af96fd3"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "texture",
"redirect": "4f1baa29-f5c2-4909-8c28-06ca2af96fd3@6c48a"
}
}

View File

@ -0,0 +1,172 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "bullet04",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 7
},
"_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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bullet041",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 6
},
"_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.07,
"y": 0.07,
"z": 0.07
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.MeshRenderer",
"_name": "Plane<ModelComponent>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_materials": [
{
"__uuid__": "2e1542f3-86c8-4d9b-9afb-afc211b1c406",
"__expectedType__": "cc.Material"
}
],
"_visFlags": 0,
"lightmapSettings": {
"__id__": 5
},
"_mesh": {
"__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@2e76e",
"__expectedType__": "cc.Mesh"
},
"_shadowCastingMode": 0,
"_shadowReceivingMode": 1,
"_enableMorph": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f0BhsQjxJFCbbp5r0Fhe/6"
},
{
"__type__": "cc.ModelLightmapSettings",
"texture": null,
"uvParam": {
"__type__": "cc.Vec4",
"x": 0,
"y": 0,
"z": 0,
"w": 0
},
"_bakeable": false,
"_castShadow": false,
"_receiveShadow": false,
"_recieveShadow": false,
"_lightmapSize": 64
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "77Pj+TCZlLUaVrnb67shT6"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "8a1M46/NtPM5DZBnpyLL8l"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.35",
"importer": "prefab",
"imported": true,
"uuid": "23ca5900-7f53-480e-a25f-98c1bc4f211e",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "bullet04"
}
}

View File

@ -0,0 +1,188 @@
[
{
"__type__": "cc.AnimationClip",
"_name": "bullet05",
"_objFlags": 0,
"_native": "",
"sample": 60,
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 0.5,
"_hash": 500763545,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": []
},
{
"__type__": "cc.animation.VectorTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
}
},
"_channels": [
{
"__id__": 4
},
{
"__id__": 6
},
{
"__id__": 8
},
{
"__id__": 10
}
],
"_nComponents": 3
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
{
"__id__": 3
},
"eulerAngles"
]
},
{
"__type__": "cc.animation.HierarchyPath",
"path": "bullet051"
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 5
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.5
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 7
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.5
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": -360,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 9
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.5
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 11
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "268aedae-50e6-4e81-b07f-73f2f083d0d2",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "bullet05"
}
}

View File

@ -0,0 +1,36 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": "3",
"_defines": [
{
"USE_INSTANCING": true,
"USE_TEXTURE": true
}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "8fbe6f7c-1df3-4999-909a-ebc831f03684@6c48a",
"__expectedType__": "cc.Texture2D"
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "2c38aeaf-b451-49bb-bee5-449a25ccb3cd",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,40 @@
{
"ver": "1.0.22",
"importer": "image",
"imported": true,
"uuid": "8fbe6f7c-1df3-4999-909a-ebc831f03684",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "8fbe6f7c-1df3-4999-909a-ebc831f03684@6c48a",
"displayName": "bullet05",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "8fbe6f7c-1df3-4999-909a-ebc831f03684"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "texture",
"redirect": "8fbe6f7c-1df3-4999-909a-ebc831f03684@6c48a"
}
}

View File

@ -0,0 +1,205 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "bullet05",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 7
}
],
"_prefab": {
"__id__": 9
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bullet051",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 6
},
"_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.16,
"y": 0.16,
"z": 0.16
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.MeshRenderer",
"_name": "Plane<ModelComponent>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_materials": [
{
"__uuid__": "2c38aeaf-b451-49bb-bee5-449a25ccb3cd",
"__expectedType__": "cc.Material"
}
],
"_visFlags": 0,
"lightmapSettings": {
"__id__": 5
},
"_mesh": {
"__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@2e76e",
"__expectedType__": "cc.Mesh"
},
"_shadowCastingMode": 0,
"_shadowReceivingMode": 1,
"_enableMorph": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a53zIJbK1DKYns887wHkgJ"
},
{
"__type__": "cc.ModelLightmapSettings",
"texture": null,
"uvParam": {
"__type__": "cc.Vec4",
"x": 0,
"y": 0,
"z": 0,
"w": 0
},
"_bakeable": false,
"_castShadow": false,
"_receiveShadow": false,
"_recieveShadow": false,
"_lightmapSize": 64
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "89DRRID85J5LwHEr5ctDNK"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"playOnLoad": true,
"_clips": [
{
"__uuid__": "268aedae-50e6-4e81-b07f-73f2f083d0d2",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "268aedae-50e6-4e81-b07f-73f2f083d0d2",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d0qccY5mtP14iFLoSvZETw"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "95hHADuFBHqKsQOD2+gO++"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.35",
"importer": "prefab",
"imported": true,
"uuid": "d35cc61a-b551-4372-97bb-6dd39c46b99f",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "bullet05"
}
}

View File

@ -0,0 +1,287 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "bullet06",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 7
},
{
"__id__": 8
},
{
"__id__": 10
},
{
"__id__": 12
}
],
"_prefab": {
"__id__": 14
},
"_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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bullet011",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 6
},
"_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.07,
"y": 0.07,
"z": 0.07
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.MeshRenderer",
"_name": "Plane<ModelComponent>",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_materials": [
{
"__uuid__": "ba9fb8f3-b662-4d9e-adcf-57bab71eeb06",
"__expectedType__": "cc.Material"
}
],
"_visFlags": 0,
"lightmapSettings": {
"__id__": 5
},
"_mesh": {
"__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@2e76e",
"__expectedType__": "cc.Mesh"
},
"_shadowCastingMode": 0,
"_shadowReceivingMode": 1,
"_enableMorph": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f9yjnY1aNIRbN0AmUkbAhW"
},
{
"__type__": "cc.ModelLightmapSettings",
"texture": null,
"uvParam": {
"__type__": "cc.Vec4",
"x": 0,
"y": 0,
"z": 0,
"w": 0
},
"_bakeable": false,
"_castShadow": false,
"_receiveShadow": false,
"_recieveShadow": false,
"_lightmapSize": 64
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "1aK71Ej9lBgbNZXYBXTe1z"
},
{
"__type__": "35d6cutJHxL8p5S82gIk1i7",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": null,
"_id": ""
},
{
"__type__": "cc.BoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_material": null,
"_isTrigger": true,
"_center": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_size": {
"__type__": "cc.Vec3",
"x": 0.061,
"y": 0.01,
"z": 0.235
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3af6uH8ERG84w38N9cGl7q"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"_group": 2,
"_type": 1,
"_mass": 1,
"_allowSleep": true,
"_linearDamping": 0.1,
"_angularDamping": 0.1,
"_useGravity": false,
"_linearFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_angularFactor": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a8CM9G3tVE27aI+Hi7DXIH"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 13
},
"_clip": {
"__uuid__": "4b9ccca5-e5a5-4aee-ba7a-df01807f7c7d",
"__expectedType__": "cc.AudioClip"
},
"_loop": false,
"_playOnAwake": true,
"_volume": 1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "17hkKHeXlCOLZYVzugDVpI"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bbNoRdlhpGz7e9EyhGCLbP"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.35",
"importer": "prefab",
"imported": true,
"uuid": "a1265d96-76f1-4977-a2cc-7287e0b85b9f",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "bullet06"
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "f538dc6e-d8b7-4cfa-ae8e-9d44d925bec3",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.35",
"importer": "prefab",
"imported": true,
"uuid": "edf40a94-4067-4e25-93f0-e714ebf09943",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "cloudStars"
}
}

View File

@ -0,0 +1,40 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "d1346436-ac96-4271-b863-1f4fdead95b0",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": 0,
"_defines": [
{}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "ce4d7ca3-c016-4e50-84d0-49eb66de9de4@6c48a",
"__expectedType__": "cc.Texture2D"
},
"tintColor": {
"__type__": "cc.Color",
"r": 128,
"g": 128,
"b": 128,
"a": 128
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "0a00a80b-1c6e-497c-9dd3-b5354f14ed59",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -0,0 +1,40 @@
{
"ver": "1.0.22",
"importer": "image",
"imported": true,
"uuid": "ce4d7ca3-c016-4e50-84d0-49eb66de9de4",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "ce4d7ca3-c016-4e50-84d0-49eb66de9de4@6c48a",
"displayName": "effectsTextures136",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "ce4d7ca3-c016-4e50-84d0-49eb66de9de4"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "texture",
"redirect": "ce4d7ca3-c016-4e50-84d0-49eb66de9de4@6c48a"
}
}

View File

@ -0,0 +1,33 @@
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"_native": "",
"_effectAsset": {
"__uuid__": "d1346436-ac96-4271-b863-1f4fdead95b0",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": "1",
"_defines": [
{}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "0083b08a-2208-4c11-87ca-96bf5b19ee7d@6c48a",
"__expectedType__": "cc.Texture2D"
}
}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.11",
"importer": "material",
"imported": true,
"uuid": "b34e56a0-9cb2-40fd-ac80-a8122f9838ac",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

View File

@ -0,0 +1,40 @@
{
"ver": "1.0.22",
"importer": "image",
"imported": true,
"uuid": "0083b08a-2208-4c11-87ca-96bf5b19ee7d",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "0083b08a-2208-4c11-87ca-96bf5b19ee7d@6c48a",
"displayName": "smoke3",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "0083b08a-2208-4c11-87ca-96bf5b19ee7d"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "texture",
"redirect": "0083b08a-2208-4c11-87ca-96bf5b19ee7d@6c48a"
}
}

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