mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
提交
This commit is contained in:
parent
9a3f666df1
commit
68d06ca612
@ -346,7 +346,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "GObject",
|
||||
"_name": "Camera",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
@ -362,94 +362,6 @@
|
||||
"_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
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "51F2pLtaRAvIrZ6+pAQ7gN"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "afU00zeEBCvYG08IYSwZ58",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Camera",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 19
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
@ -485,11 +397,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 18
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 20
|
||||
"__id__": 16
|
||||
},
|
||||
"_projection": 0,
|
||||
"_priority": 0,
|
||||
@ -547,6 +459,94 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "GObject",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_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
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"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": "51F2pLtaRAvIrZ6+pAQ7gN"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "afU00zeEBCvYG08IYSwZ58",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
|
@ -0,0 +1,18 @@
|
||||
import { GPetAminEnum } from "../../anim/GPetAnim";
|
||||
import { GFSMDefaultAnim } from "../Default/GFSMDefaultAnim";
|
||||
import { GFSMAnimBase, GFSMProcessAnimInfo } from "../GFSMAnimBase";
|
||||
|
||||
|
||||
export default class GFSMCampGuardianAnim extends GFSMAnimBase{
|
||||
|
||||
// 流程图
|
||||
process: { [key: number]: GFSMProcessAnimInfo; } = {
|
||||
[0]:{
|
||||
title:"等待",
|
||||
isLoop:true,
|
||||
animName:GPetAminEnum.Fly,
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "34be6f53-5c77-4e9b-b66e-16080f2f548e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -5,6 +5,10 @@ import { GFSMAnimBase } from "../../fsm/GFSMAnimBase";
|
||||
import GFSMBase from "../../fsm/GFSMBase";
|
||||
import GRoleBase from "../GRoleBase";
|
||||
import { ProgressBar } from "cc";
|
||||
import { TB } from "../../../../config/data/schema";
|
||||
import { GPetAminEnum } from "../../anim/GPetAnim";
|
||||
import { v3 } from "cc";
|
||||
import GFSMCampGuardianAnim from "../../fsm/CampGuardian/GFSMCampGuardianAnim";
|
||||
const { property,ccclass } = _decorator;
|
||||
|
||||
//阵营守护 水晶
|
||||
@ -13,12 +17,17 @@ export default class GRoleCGCrystal extends GRoleBase<{}>{
|
||||
|
||||
@property(ProgressBar)
|
||||
bloodVolume:ProgressBar;
|
||||
|
||||
init(role:TB.TbGRole){
|
||||
super.init(role)
|
||||
this.node.scale = v3(2,2,2);
|
||||
}
|
||||
|
||||
protected fsmCreate(): GFSMBase {
|
||||
return new GFSMBase();
|
||||
}
|
||||
protected fsmAnimCreate(): GFSMDefaultAnim {
|
||||
return new GFSMDefaultAnim(this.spine);
|
||||
protected fsmAnimCreate(): GFSMAnimBase {
|
||||
return new GFSMCampGuardianAnim(this.spine);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
protected fsmCreate(): GFSMDefault {
|
||||
return new GFSMDefault(this);
|
||||
}
|
||||
protected fsmAnimCreate(): GFSMDefaultAnim {
|
||||
protected fsmAnimCreate(): GFSMAnimBase {
|
||||
return new GFSMDefaultAnim(this.spine);
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,9 @@ export enum GCampGuardianEnum{
|
||||
export default class GCampGuardianMode extends GBaseMode<{},{}>{
|
||||
|
||||
//玩家水晶位置
|
||||
playerPos: Vec2 = new Vec2(-800,-100);
|
||||
playerPos: Vec2 = new Vec2(-800,-50);
|
||||
//敌方水晶位置
|
||||
enemyPos: Vec2 = new Vec2(800,-100);
|
||||
enemyPos: Vec2 = new Vec2(800,-50);
|
||||
|
||||
//我方水晶
|
||||
|
||||
@ -62,7 +62,7 @@ export default class GCampGuardianMode extends GBaseMode<{},{}>{
|
||||
let max = TD.TbGRole.getDataList().length;
|
||||
this.onGenRole(GCampGuardianEnum.PLAYER,TD.TbGRole.getDataList()[Math.floor(this.getSync().SyncRandomInt(0,max - 1))]);
|
||||
this.onGenRole(GCampGuardianEnum.ENEMY,TD.TbGRole.getDataList()[Math.floor(this.getSync().SyncRandomInt(0,max - 1))]);
|
||||
},1000)
|
||||
},2000)
|
||||
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ export default class GCampGuardianMode extends GBaseMode<{},{}>{
|
||||
}
|
||||
|
||||
//绑定死亡回调
|
||||
// entity.addKillBackEvent(this.onRoleKillBack.bind(this))
|
||||
entity.addKillBackEvent(this.onRoleKillBack.bind(this))
|
||||
|
||||
//添加宠物属性
|
||||
entity.onEffectiveValue(new GPetAttribute({
|
||||
|
10
JisolGameCocos/assets/script/tools/NumberTools.ts
Normal file
10
JisolGameCocos/assets/script/tools/NumberTools.ts
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
export default class NumberTools {
|
||||
|
||||
//随机
|
||||
public GetRank(min, max) {
|
||||
return Math.round(Math.random() * (max - min)) + min;
|
||||
}
|
||||
|
||||
}
|
||||
|
9
JisolGameCocos/assets/script/tools/NumberTools.ts.meta
Normal file
9
JisolGameCocos/assets/script/tools/NumberTools.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ad1090ba-256d-4f25-bd82-8979cb540c1e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user