Merge pull request #7 from genxium/dungeon_characters

Updated anim of characters, and minor updates to inputs on wire to support atk button.
This commit is contained in:
Wing 2022-11-20 20:18:44 +08:00 committed by GitHub
commit 335fef66ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 3326 additions and 3831 deletions

View File

@ -345,13 +345,6 @@ func (pR *Room) ConvertToLastUsedRenderFrameId(inputFrameId int32, inputDelayFra
return ((inputFrameId << pR.InputScaleFrames) + inputDelayFrames + (1 << pR.InputScaleFrames) - 1)
}
func (pR *Room) EncodeUpsyncCmd(upsyncCmd *InputFrameUpsync) uint64 {
var ret uint64 = 0
// There're 13 possible directions, occupying the first 4 bits, no need to shift
ret += uint64(upsyncCmd.EncodedDir)
return ret
}
func (pR *Room) RenderFrameBufferString() string {
return fmt.Sprintf("{renderFrameId: %d, stRenderFrameId: %d, edRenderFrameId: %d, lastAllConfirmedRenderFrameId: %d}", pR.RenderFrameId, pR.RenderFrameBuffer.StFrameId, pR.RenderFrameBuffer.EdFrameId, pR.CurDynamicsRenderFrameId)
}
@ -1073,7 +1066,7 @@ func (pR *Room) prefabInputFrameDownsync(inputFrameId int32) *InputFrameDownsync
ConfirmedList: uint64(0),
}
} else {
tmp := pR.InputsBuffer.GetByFrameId(inputFrameId - 1)
tmp := pR.InputsBuffer.GetByFrameId(inputFrameId - 1) // There's no need for the backend to find the "lastAllConfirmed inputs" for prefabbing, either "BackendDynamicsEnabled" is true or false
if nil == tmp {
panic(fmt.Sprintf("Error prefabbing inputFrameDownsync: roomId=%v, InputsBuffer=%v", pR.Id, pR.InputsBufferString(false)))
}
@ -1114,7 +1107,7 @@ func (pR *Room) markConfirmationIfApplicable() {
}
inputFrameUpsync := tmp.(*InputFrameUpsync)
indiceInJoinIndexBooleanArr := uint32(player.JoinIndex - 1)
inputFrameDownsync.InputList[indiceInJoinIndexBooleanArr] = pR.EncodeUpsyncCmd(inputFrameUpsync)
inputFrameDownsync.InputList[indiceInJoinIndexBooleanArr] = inputFrameUpsync.Encoded
inputFrameDownsync.ConfirmedList |= (1 << indiceInJoinIndexBooleanArr)
}
@ -1239,9 +1232,8 @@ func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputF
joinIndex := player.JoinIndex
effPushbacks[joinIndex-1].X, effPushbacks[joinIndex-1].Y = float64(0), float64(0)
currPlayerDownsync := currRenderFrame.Players[playerId]
encodedInput := inputList[joinIndex-1]
decodedInput := DIRECTION_DECODER[encodedInput]
proposedVirtualGridDx, proposedVirtualGridDy := (decodedInput[0] + decodedInput[0]*currPlayerDownsync.Speed), (decodedInput[1] + decodedInput[1]*currPlayerDownsync.Speed)
decodedInput := pR.decodeInput(inputList[joinIndex-1])
proposedVirtualGridDx, proposedVirtualGridDy := (decodedInput.Dx + decodedInput.Dx*currPlayerDownsync.Speed), (decodedInput.Dy + decodedInput.Dy*currPlayerDownsync.Speed)
newVx, newVy := (currPlayerDownsync.VirtualGridX + proposedVirtualGridDx), (currPlayerDownsync.VirtualGridY + proposedVirtualGridDy)
// Reset playerCollider position from the "virtual grid position"
collisionPlayerIndex := COLLISION_PLAYER_INDEX_PREFIX + joinIndex
@ -1251,10 +1243,10 @@ func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputF
// Update in the collision system
playerCollider.Update()
if 0 < encodedInput {
if 0 != decodedInput.Dx || 0 != decodedInput.Dy {
Logger.Debug(fmt.Sprintf("Checking collision for playerId=%v: virtual (%d, %d) -> (%d, %d), now playerShape=%v", playerId, currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY, newVx, newVy, ConvexPolygonStr(playerCollider.Shape.(*resolv.ConvexPolygon))))
nextRenderFramePlayers[playerId].Dir.Dx = decodedInput[0]
nextRenderFramePlayers[playerId].Dir.Dy = decodedInput[1]
nextRenderFramePlayers[playerId].Dir.Dx = decodedInput.Dx
nextRenderFramePlayers[playerId].Dir.Dy = decodedInput.Dy
}
}
@ -1295,6 +1287,16 @@ func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputF
return toRet
}
func (pR *Room) decodeInput(encodedInput uint64) *InputFrameDecoded {
encodedDirection := (encodedInput & 0xf)
btnALevel := int32((encodedInput >> 4) & 1)
return &InputFrameDecoded{
Dx: DIRECTION_DECODER[encodedDirection][0],
Dy: DIRECTION_DECODER[encodedDirection][1],
BtnALevel: btnALevel,
}
}
func (pR *Room) inputFrameIdDebuggable(inputFrameId int32) bool {
return 0 == (inputFrameId % 10)
}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.7.1
// protoc v3.21.4
// source: room_downsync_frame.proto
package protos
@ -442,19 +442,82 @@ func (x *PlayerDownsyncMeta) GetColliderRadius() float64 {
return 0
}
type InputFrameDecoded struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Dx int32 `protobuf:"varint,1,opt,name=dx,proto3" json:"dx,omitempty"`
Dy int32 `protobuf:"varint,2,opt,name=dy,proto3" json:"dy,omitempty"`
BtnALevel int32 `protobuf:"varint,3,opt,name=btnALevel,proto3" json:"btnALevel,omitempty"`
}
func (x *InputFrameDecoded) Reset() {
*x = InputFrameDecoded{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InputFrameDecoded) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InputFrameDecoded) ProtoMessage() {}
func (x *InputFrameDecoded) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InputFrameDecoded.ProtoReflect.Descriptor instead.
func (*InputFrameDecoded) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{3}
}
func (x *InputFrameDecoded) GetDx() int32 {
if x != nil {
return x.Dx
}
return 0
}
func (x *InputFrameDecoded) GetDy() int32 {
if x != nil {
return x.Dy
}
return 0
}
func (x *InputFrameDecoded) GetBtnALevel() int32 {
if x != nil {
return x.BtnALevel
}
return 0
}
type InputFrameUpsync struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
InputFrameId int32 `protobuf:"varint,1,opt,name=inputFrameId,proto3" json:"inputFrameId,omitempty"`
EncodedDir int32 `protobuf:"varint,6,opt,name=encodedDir,proto3" json:"encodedDir,omitempty"`
Encoded uint64 `protobuf:"varint,2,opt,name=encoded,proto3" json:"encoded,omitempty"`
}
func (x *InputFrameUpsync) Reset() {
*x = InputFrameUpsync{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[3]
mi := &file_room_downsync_frame_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -467,7 +530,7 @@ func (x *InputFrameUpsync) String() string {
func (*InputFrameUpsync) ProtoMessage() {}
func (x *InputFrameUpsync) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[3]
mi := &file_room_downsync_frame_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -480,7 +543,7 @@ func (x *InputFrameUpsync) ProtoReflect() protoreflect.Message {
// Deprecated: Use InputFrameUpsync.ProtoReflect.Descriptor instead.
func (*InputFrameUpsync) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{3}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{4}
}
func (x *InputFrameUpsync) GetInputFrameId() int32 {
@ -490,9 +553,9 @@ func (x *InputFrameUpsync) GetInputFrameId() int32 {
return 0
}
func (x *InputFrameUpsync) GetEncodedDir() int32 {
func (x *InputFrameUpsync) GetEncoded() uint64 {
if x != nil {
return x.EncodedDir
return x.Encoded
}
return 0
}
@ -510,7 +573,7 @@ type InputFrameDownsync struct {
func (x *InputFrameDownsync) Reset() {
*x = InputFrameDownsync{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[4]
mi := &file_room_downsync_frame_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -523,7 +586,7 @@ func (x *InputFrameDownsync) String() string {
func (*InputFrameDownsync) ProtoMessage() {}
func (x *InputFrameDownsync) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[4]
mi := &file_room_downsync_frame_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -536,7 +599,7 @@ func (x *InputFrameDownsync) ProtoReflect() protoreflect.Message {
// Deprecated: Use InputFrameDownsync.ProtoReflect.Descriptor instead.
func (*InputFrameDownsync) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{4}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{5}
}
func (x *InputFrameDownsync) GetInputFrameId() int32 {
@ -571,7 +634,7 @@ type HeartbeatUpsync struct {
func (x *HeartbeatUpsync) Reset() {
*x = HeartbeatUpsync{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[5]
mi := &file_room_downsync_frame_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -584,7 +647,7 @@ func (x *HeartbeatUpsync) String() string {
func (*HeartbeatUpsync) ProtoMessage() {}
func (x *HeartbeatUpsync) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[5]
mi := &file_room_downsync_frame_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -597,7 +660,7 @@ func (x *HeartbeatUpsync) ProtoReflect() protoreflect.Message {
// Deprecated: Use HeartbeatUpsync.ProtoReflect.Descriptor instead.
func (*HeartbeatUpsync) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{5}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{6}
}
func (x *HeartbeatUpsync) GetClientTimestamp() int64 {
@ -621,7 +684,7 @@ type RoomDownsyncFrame struct {
func (x *RoomDownsyncFrame) Reset() {
*x = RoomDownsyncFrame{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[6]
mi := &file_room_downsync_frame_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -634,7 +697,7 @@ func (x *RoomDownsyncFrame) String() string {
func (*RoomDownsyncFrame) ProtoMessage() {}
func (x *RoomDownsyncFrame) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[6]
mi := &file_room_downsync_frame_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -647,7 +710,7 @@ func (x *RoomDownsyncFrame) ProtoReflect() protoreflect.Message {
// Deprecated: Use RoomDownsyncFrame.ProtoReflect.Descriptor instead.
func (*RoomDownsyncFrame) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{6}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{7}
}
func (x *RoomDownsyncFrame) GetId() int32 {
@ -696,7 +759,7 @@ type WsReq struct {
func (x *WsReq) Reset() {
*x = WsReq{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[7]
mi := &file_room_downsync_frame_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -709,7 +772,7 @@ func (x *WsReq) String() string {
func (*WsReq) ProtoMessage() {}
func (x *WsReq) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[7]
mi := &file_room_downsync_frame_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -722,7 +785,7 @@ func (x *WsReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use WsReq.ProtoReflect.Descriptor instead.
func (*WsReq) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{7}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{8}
}
func (x *WsReq) GetMsgId() int32 {
@ -797,7 +860,7 @@ type WsResp struct {
func (x *WsResp) Reset() {
*x = WsResp{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[8]
mi := &file_room_downsync_frame_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -810,7 +873,7 @@ func (x *WsResp) String() string {
func (*WsResp) ProtoMessage() {}
func (x *WsResp) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[8]
mi := &file_room_downsync_frame_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -823,7 +886,7 @@ func (x *WsResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use WsResp.ProtoReflect.Descriptor instead.
func (*WsResp) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{8}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{9}
}
func (x *WsResp) GetRet() int32 {
@ -992,87 +1055,92 @@ var file_room_downsync_frame_proto_rawDesc = []byte{
0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x69,
0x64, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52,
0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x22,
0x56, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73,
0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d,
0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74,
0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64,
0x65, 0x64, 0x44, 0x69, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x65, 0x6e, 0x63,
0x6f, 0x64, 0x65, 0x64, 0x44, 0x69, 0x72, 0x22, 0x7c, 0x0a, 0x12, 0x49, 0x6e, 0x70, 0x75, 0x74,
0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a,
0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49,
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02,
0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65,
0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65,
0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x22, 0x8b, 0x03, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73,
0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79,
0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46,
0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e,
0x6f, 0x73, 0x12, 0x4c, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61,
0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73,
0x1a, 0x52, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65,
0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5a, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65,
0x74, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e,
0x63, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0xb8, 0x02, 0x0a, 0x05, 0x57, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73,
0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x1c,
0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d,
0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65,
0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75,
0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12,
0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65,
0x49, 0x64, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65,
0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74,
0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15, 0x69, 0x6e, 0x70,
0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74,
0x63, 0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x89, 0x02, 0x0a, 0x06,
0x57, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x63, 0x68, 0x6f,
0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x65,
0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x03,
0x72, 0x64, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46,
0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, 0x17, 0x69, 0x6e, 0x70,
0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42,
0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f,
0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61,
0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12,
0x36, 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62,
0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x42, 0x13, 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x51, 0x0a, 0x11, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x63,
0x6f, 0x64, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x64, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65,
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76,
0x65, 0x6c, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65,
0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46,
0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e,
0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e,
0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x63,
0x6f, 0x64, 0x65, 0x64, 0x22, 0x7c, 0x0a, 0x12, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61,
0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e,
0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1c,
0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28,
0x04, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d,
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69,
0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55,
0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f,
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22,
0x8b, 0x03, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63,
0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d,
0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07,
0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12,
0x4c, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f,
0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e,
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x1a, 0x52, 0x0a,
0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f,
0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x1a, 0x5a, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x65,
0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb8, 0x02,
0x0a, 0x05, 0x57, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a,
0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6a,
0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x63, 0x6b,
0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12,
0x2e, 0x0a, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72,
0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x63, 0x6b,
0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12,
0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73,
0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61,
0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46,
0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12,
0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70,
0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x89, 0x02, 0x0a, 0x06, 0x57, 0x73, 0x52,
0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d,
0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x65, 0x63, 0x68, 0x6f,
0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x64, 0x66,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d,
0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46,
0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63,
0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73,
0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44,
0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x36, 0x0a, 0x08,
0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f,
0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x63, 0x69, 0x46,
0x72, 0x61, 0x6d, 0x65, 0x42, 0x13, 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73,
0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
@ -1087,38 +1155,39 @@ func file_room_downsync_frame_proto_rawDescGZIP() []byte {
return file_room_downsync_frame_proto_rawDescData
}
var file_room_downsync_frame_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_room_downsync_frame_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_room_downsync_frame_proto_goTypes = []interface{}{
(*BattleColliderInfo)(nil), // 0: protos.BattleColliderInfo
(*PlayerDownsync)(nil), // 1: protos.PlayerDownsync
(*PlayerDownsyncMeta)(nil), // 2: protos.PlayerDownsyncMeta
(*InputFrameUpsync)(nil), // 3: protos.InputFrameUpsync
(*InputFrameDownsync)(nil), // 4: protos.InputFrameDownsync
(*HeartbeatUpsync)(nil), // 5: protos.HeartbeatUpsync
(*RoomDownsyncFrame)(nil), // 6: protos.RoomDownsyncFrame
(*WsReq)(nil), // 7: protos.WsReq
(*WsResp)(nil), // 8: protos.WsResp
nil, // 9: protos.BattleColliderInfo.StrToVec2DListMapEntry
nil, // 10: protos.BattleColliderInfo.StrToPolygon2DListMapEntry
nil, // 11: protos.RoomDownsyncFrame.PlayersEntry
nil, // 12: protos.RoomDownsyncFrame.PlayerMetasEntry
(*sharedprotos.Direction)(nil), // 13: sharedprotos.Direction
(*sharedprotos.Vec2DList)(nil), // 14: sharedprotos.Vec2DList
(*sharedprotos.Polygon2DList)(nil), // 15: sharedprotos.Polygon2DList
(*InputFrameDecoded)(nil), // 3: protos.InputFrameDecoded
(*InputFrameUpsync)(nil), // 4: protos.InputFrameUpsync
(*InputFrameDownsync)(nil), // 5: protos.InputFrameDownsync
(*HeartbeatUpsync)(nil), // 6: protos.HeartbeatUpsync
(*RoomDownsyncFrame)(nil), // 7: protos.RoomDownsyncFrame
(*WsReq)(nil), // 8: protos.WsReq
(*WsResp)(nil), // 9: protos.WsResp
nil, // 10: protos.BattleColliderInfo.StrToVec2DListMapEntry
nil, // 11: protos.BattleColliderInfo.StrToPolygon2DListMapEntry
nil, // 12: protos.RoomDownsyncFrame.PlayersEntry
nil, // 13: protos.RoomDownsyncFrame.PlayerMetasEntry
(*sharedprotos.Direction)(nil), // 14: sharedprotos.Direction
(*sharedprotos.Vec2DList)(nil), // 15: sharedprotos.Vec2DList
(*sharedprotos.Polygon2DList)(nil), // 16: sharedprotos.Polygon2DList
}
var file_room_downsync_frame_proto_depIdxs = []int32{
9, // 0: protos.BattleColliderInfo.strToVec2DListMap:type_name -> protos.BattleColliderInfo.StrToVec2DListMapEntry
10, // 1: protos.BattleColliderInfo.strToPolygon2DListMap:type_name -> protos.BattleColliderInfo.StrToPolygon2DListMapEntry
13, // 2: protos.PlayerDownsync.dir:type_name -> sharedprotos.Direction
11, // 3: protos.RoomDownsyncFrame.players:type_name -> protos.RoomDownsyncFrame.PlayersEntry
12, // 4: protos.RoomDownsyncFrame.playerMetas:type_name -> protos.RoomDownsyncFrame.PlayerMetasEntry
3, // 5: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync
5, // 6: protos.WsReq.hb:type_name -> protos.HeartbeatUpsync
6, // 7: protos.WsResp.rdf:type_name -> protos.RoomDownsyncFrame
4, // 8: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync
10, // 0: protos.BattleColliderInfo.strToVec2DListMap:type_name -> protos.BattleColliderInfo.StrToVec2DListMapEntry
11, // 1: protos.BattleColliderInfo.strToPolygon2DListMap:type_name -> protos.BattleColliderInfo.StrToPolygon2DListMapEntry
14, // 2: protos.PlayerDownsync.dir:type_name -> sharedprotos.Direction
12, // 3: protos.RoomDownsyncFrame.players:type_name -> protos.RoomDownsyncFrame.PlayersEntry
13, // 4: protos.RoomDownsyncFrame.playerMetas:type_name -> protos.RoomDownsyncFrame.PlayerMetasEntry
4, // 5: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync
6, // 6: protos.WsReq.hb:type_name -> protos.HeartbeatUpsync
7, // 7: protos.WsResp.rdf:type_name -> protos.RoomDownsyncFrame
5, // 8: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync
0, // 9: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo
14, // 10: protos.BattleColliderInfo.StrToVec2DListMapEntry.value:type_name -> sharedprotos.Vec2DList
15, // 11: protos.BattleColliderInfo.StrToPolygon2DListMapEntry.value:type_name -> sharedprotos.Polygon2DList
15, // 10: protos.BattleColliderInfo.StrToVec2DListMapEntry.value:type_name -> sharedprotos.Vec2DList
16, // 11: protos.BattleColliderInfo.StrToPolygon2DListMapEntry.value:type_name -> sharedprotos.Polygon2DList
1, // 12: protos.RoomDownsyncFrame.PlayersEntry.value:type_name -> protos.PlayerDownsync
2, // 13: protos.RoomDownsyncFrame.PlayerMetasEntry.value:type_name -> protos.PlayerDownsyncMeta
14, // [14:14] is the sub-list for method output_type
@ -1171,7 +1240,7 @@ func file_room_downsync_frame_proto_init() {
}
}
file_room_downsync_frame_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InputFrameUpsync); i {
switch v := v.(*InputFrameDecoded); i {
case 0:
return &v.state
case 1:
@ -1183,7 +1252,7 @@ func file_room_downsync_frame_proto_init() {
}
}
file_room_downsync_frame_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InputFrameDownsync); i {
switch v := v.(*InputFrameUpsync); i {
case 0:
return &v.state
case 1:
@ -1195,7 +1264,7 @@ func file_room_downsync_frame_proto_init() {
}
}
file_room_downsync_frame_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeartbeatUpsync); i {
switch v := v.(*InputFrameDownsync); i {
case 0:
return &v.state
case 1:
@ -1207,7 +1276,7 @@ func file_room_downsync_frame_proto_init() {
}
}
file_room_downsync_frame_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RoomDownsyncFrame); i {
switch v := v.(*HeartbeatUpsync); i {
case 0:
return &v.state
case 1:
@ -1219,7 +1288,7 @@ func file_room_downsync_frame_proto_init() {
}
}
file_room_downsync_frame_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WsReq); i {
switch v := v.(*RoomDownsyncFrame); i {
case 0:
return &v.state
case 1:
@ -1231,6 +1300,18 @@ func file_room_downsync_frame_proto_init() {
}
}
file_room_downsync_frame_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WsReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_room_downsync_frame_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WsResp); i {
case 0:
return &v.state
@ -1249,7 +1330,7 @@ func file_room_downsync_frame_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_room_downsync_frame_proto_rawDesc,
NumEnums: 0,
NumMessages: 13,
NumMessages: 14,
NumExtensions: 0,
NumServices: 0,
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.7.1
// protoc v3.21.4
// source: geometry.proto
package sharedprotos

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"width":128,"imagePath":"SoldierElf_tex.png","height":128,"name":"SoldierElf","SubTexture":[{"frameHeight":45,"y":1,"frameX":0,"width":34,"frameY":0,"height":44,"name":"cape","frameWidth":34,"x":70},{"width":10,"y":107,"height":14,"name":"shouder_l","x":74},{"width":11,"y":107,"height":14,"name":"forearm_l","x":61},{"width":15,"y":93,"height":16,"name":"hand_l","x":1},{"width":30,"y":61,"height":30,"name":"weapon_hand_l","x":1},{"width":8,"y":101,"height":11,"name":"thigh_l","x":86},{"width":12,"y":93,"height":17,"name":"calf_l","x":18},{"width":20,"y":113,"height":8,"name":"foot_l","x":39},{"width":28,"y":61,"height":31,"name":"pelvis","x":33},{"width":8,"y":88,"height":11,"name":"thigh_r","x":77},{"width":12,"y":88,"height":17,"name":"calf_r","x":63},{"width":20,"y":113,"height":8,"name":"foot_r","x":17},{"width":13,"y":94,"height":12,"name":"shouder_r","x":45},{"width":67,"y":1,"height":58,"name":"chest","x":1},{"width":11,"y":94,"height":17,"name":"forearm_r","x":32},{"width":14,"y":111,"height":13,"name":"hand_r","x":1},{"frameHeight":39,"y":47,"frameX":-2,"width":34,"frameY":0,"height":39,"name":"we_bl_4_f_1","frameWidth":36,"x":70}]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1 @@
{"imagePath":"Soldier_02_tex.png","width":128,"name":"Soldier_02","SubTexture":[{"x":53,"y":44,"width":23,"name":"biu","height":22},{"x":76,"y":68,"width":9,"name":"rightArm","height":14},{"y":35,"frameY":0,"height":32,"frameWidth":29,"frameX":-1,"frameHeight":32,"width":27,"name":"yinmoqe00","x":89},{"x":53,"y":1,"width":34,"name":"body","height":41},{"x":78,"y":44,"width":9,"name":"rightShoulder","height":13},{"y":50,"frameY":0,"height":18,"frameWidth":19,"frameX":0,"frameHeight":18,"width":19,"name":"rightFrontArm","x":23},{"x":23,"y":70,"width":14,"name":"rightHand","height":14},{"y":68,"frameY":0,"height":12,"frameWidth":12,"frameX":0,"frameHeight":12,"width":12,"name":"leftArm","x":62},{"x":1,"y":73,"width":13,"name":"leftShoulder","height":12},{"x":1,"y":50,"width":20,"name":"leftFrontArm","height":21},{"x":89,"y":1,"width":33,"name":"head","height":32},{"x":1,"y":1,"width":50,"name":"head2","height":47},{"x":44,"y":68,"width":16,"name":"leftHand","height":14},{"y":59,"frameY":-2,"height":4,"frameWidth":8,"frameX":-1,"frameHeight":8,"width":4,"name":"huomiao01","x":78}],"height":128}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "2202f4f4-b792-4dea-8302-633315aded66",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"width":128,"SubTexture":[{"frameWidth":34,"y":1,"frameHeight":45,"width":34,"frameX":0,"height":44,"name":"cape","frameY":0,"x":70},{"width":10,"y":107,"height":14,"name":"shouder_l","x":74},{"width":11,"y":107,"height":14,"name":"forearm_l","x":61},{"width":15,"y":93,"height":16,"name":"hand_l","x":1},{"width":30,"y":61,"height":30,"name":"weapon_hand_l","x":1},{"width":8,"y":88,"height":11,"name":"thigh_l","x":77},{"width":12,"y":93,"height":17,"name":"calf_l","x":18},{"width":20,"y":113,"height":8,"name":"foot_l","x":39},{"width":28,"y":61,"height":31,"name":"pelvis","x":33},{"width":8,"y":101,"height":11,"name":"thigh_r","x":86},{"width":12,"y":88,"height":17,"name":"calf_r","x":63},{"width":20,"y":113,"height":8,"name":"foot_r","x":17},{"width":13,"y":94,"height":12,"name":"shouder_r","x":45},{"width":67,"y":1,"height":58,"name":"chest","x":1},{"width":11,"y":94,"height":17,"name":"forearm_r","x":32},{"width":14,"y":111,"height":13,"name":"hand_r","x":1},{"frameWidth":36,"y":47,"frameHeight":39,"width":34,"frameX":-2,"height":39,"name":"we_bl_4_f_1","frameY":0,"x":70}],"height":128,"name":"SoldierElf","imagePath":"SoldierElf_tex.png"}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.0",
"uuid": "24d7bb8f-577c-4e5d-b730-56613ca8685d",
"atlasJson": "{\"width\":128,\"SubTexture\":[{\"frameWidth\":34,\"y\":1,\"frameHeight\":45,\"width\":34,\"frameX\":0,\"height\":44,\"name\":\"cape\",\"frameY\":0,\"x\":70},{\"width\":10,\"y\":107,\"height\":14,\"name\":\"shouder_l\",\"x\":74},{\"width\":11,\"y\":107,\"height\":14,\"name\":\"forearm_l\",\"x\":61},{\"width\":15,\"y\":93,\"height\":16,\"name\":\"hand_l\",\"x\":1},{\"width\":30,\"y\":61,\"height\":30,\"name\":\"weapon_hand_l\",\"x\":1},{\"width\":8,\"y\":88,\"height\":11,\"name\":\"thigh_l\",\"x\":77},{\"width\":12,\"y\":93,\"height\":17,\"name\":\"calf_l\",\"x\":18},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_l\",\"x\":39},{\"width\":28,\"y\":61,\"height\":31,\"name\":\"pelvis\",\"x\":33},{\"width\":8,\"y\":101,\"height\":11,\"name\":\"thigh_r\",\"x\":86},{\"width\":12,\"y\":88,\"height\":17,\"name\":\"calf_r\",\"x\":63},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_r\",\"x\":17},{\"width\":13,\"y\":94,\"height\":12,\"name\":\"shouder_r\",\"x\":45},{\"width\":67,\"y\":1,\"height\":58,\"name\":\"chest\",\"x\":1},{\"width\":11,\"y\":94,\"height\":17,\"name\":\"forearm_r\",\"x\":32},{\"width\":14,\"y\":111,\"height\":13,\"name\":\"hand_r\",\"x\":1},{\"frameWidth\":36,\"y\":47,\"frameHeight\":39,\"width\":34,\"frameX\":-2,\"height\":39,\"name\":\"we_bl_4_f_1\",\"frameY\":0,\"x\":70}],\"height\":128,\"name\":\"SoldierElf\",\"imagePath\":\"SoldierElf_tex.png\"}",
"texture": "050fb016-1a1f-4341-8367-283bfeddc4a8",
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "050fb016-1a1f-4341-8367-283bfeddc4a8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"SoldierElf_tex": {
"ver": "1.0.4",
"uuid": "c62e1779-f92b-40d3-bf4f-7ab747e33d6e",
"rawTextureUuid": "050fb016-1a1f-4341-8367-283bfeddc4a8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -11.5,
"offsetY": 1.5,
"trimX": 1,
"trimY": 1,
"width": 103,
"height": 123,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "f1176719-d1d6-4af5-89c6-ddff16ab85fd",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"width":128,"SubTexture":[{"frameWidth":23,"y":44,"frameHeight":22,"width":22,"frameX":-1,"height":22,"name":"biu","frameY":0,"x":53},{"width":9,"y":68,"height":14,"name":"rightArm","x":76},{"frameWidth":29,"y":35,"frameHeight":32,"width":26,"frameX":-1,"height":32,"name":"yinmoqe00","frameY":0,"x":89},{"width":34,"y":1,"height":41,"name":"body","x":53},{"width":9,"y":44,"height":13,"name":"rightShoulder","x":77},{"width":19,"y":50,"height":18,"name":"rightFrontArm","x":23},{"width":14,"y":70,"height":14,"name":"rightHand","x":23},{"width":12,"y":68,"height":12,"name":"leftArm","x":62},{"width":13,"y":73,"height":12,"name":"leftShoulder","x":1},{"width":20,"y":50,"height":21,"name":"leftFrontArm","x":1},{"width":33,"y":1,"height":32,"name":"head","x":89},{"width":50,"y":1,"height":47,"name":"head2","x":1},{"width":16,"y":68,"height":14,"name":"leftHand","x":44},{"frameWidth":8,"y":59,"frameHeight":8,"width":4,"frameX":-1,"height":4,"name":"huomiao01","frameY":-2,"x":77}],"height":128,"name":"SoldierFireGhost","imagePath":"SoldierFireGhost_tex.png"}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.0",
"uuid": "4a9187d5-a9ad-4464-a03c-d2f3cc277051",
"atlasJson": "{\"width\":128,\"SubTexture\":[{\"frameWidth\":23,\"y\":44,\"frameHeight\":22,\"width\":22,\"frameX\":-1,\"height\":22,\"name\":\"biu\",\"frameY\":0,\"x\":53},{\"width\":9,\"y\":68,\"height\":14,\"name\":\"rightArm\",\"x\":76},{\"frameWidth\":29,\"y\":35,\"frameHeight\":32,\"width\":26,\"frameX\":-1,\"height\":32,\"name\":\"yinmoqe00\",\"frameY\":0,\"x\":89},{\"width\":34,\"y\":1,\"height\":41,\"name\":\"body\",\"x\":53},{\"width\":9,\"y\":44,\"height\":13,\"name\":\"rightShoulder\",\"x\":77},{\"width\":19,\"y\":50,\"height\":18,\"name\":\"rightFrontArm\",\"x\":23},{\"width\":14,\"y\":70,\"height\":14,\"name\":\"rightHand\",\"x\":23},{\"width\":12,\"y\":68,\"height\":12,\"name\":\"leftArm\",\"x\":62},{\"width\":13,\"y\":73,\"height\":12,\"name\":\"leftShoulder\",\"x\":1},{\"width\":20,\"y\":50,\"height\":21,\"name\":\"leftFrontArm\",\"x\":1},{\"width\":33,\"y\":1,\"height\":32,\"name\":\"head\",\"x\":89},{\"width\":50,\"y\":1,\"height\":47,\"name\":\"head2\",\"x\":1},{\"width\":16,\"y\":68,\"height\":14,\"name\":\"leftHand\",\"x\":44},{\"frameWidth\":8,\"y\":59,\"frameHeight\":8,\"width\":4,\"frameX\":-1,\"height\":4,\"name\":\"huomiao01\",\"frameY\":-2,\"x\":77}],\"height\":128,\"name\":\"SoldierFireGhost\",\"imagePath\":\"SoldierFireGhost_tex.png\"}",
"texture": "700d963b-2192-4219-a066-8be5b3db7453",
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "700d963b-2192-4219-a066-8be5b3db7453",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"SoldierFireGhost_tex": {
"ver": "1.0.4",
"uuid": "8ef8a6b3-0bac-4cf1-bba0-ab090f4d9e52",
"rawTextureUuid": "700d963b-2192-4219-a066-8be5b3db7453",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -2.5,
"offsetY": 21,
"trimX": 1,
"trimY": 1,
"width": 121,
"height": 84,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.2" tiledversion="1.2.3" orientation="orthogonal" renderorder="right-down" width="64" height="64" tilewidth="16" tileheight="16" infinite="0" nextlayerid="2" nextobjectid="8">
<map version="1.2" tiledversion="1.2.3" orientation="orthogonal" renderorder="right-down" width="64" height="64" tilewidth="16" tileheight="16" infinite="0" nextlayerid="2" nextobjectid="12">
<tileset firstgid="1" source="tiles0.tsx"/>
<tileset firstgid="65" source="tiles1.tsx"/>
<layer id="1" name="Ground" width="64" height="64">
@ -61,5 +61,29 @@
</properties>
<polyline points="0,0 -191.667,0.666667 -191.667,17.3333 -0.715174,17.3333"/>
</object>
<object id="8" x="-9.33333" y="-13.3333">
<properties>
<property name="boundary_type" value="barrier"/>
</properties>
<polyline points="0,0 0,18.6667 1041.33,21.3333 1041.33,-1.33333"/>
</object>
<object id="9" x="-9.33333" y="1014.67">
<properties>
<property name="boundary_type" value="barrier"/>
</properties>
<polyline points="0,0 0,18.6667 1041.33,21.3333 1041.33,-1.33333"/>
</object>
<object id="10" x="-14" y="-40">
<properties>
<property name="boundary_type" value="barrier"/>
</properties>
<polyline points="0,0 4,1110 24,1110 24,-8"/>
</object>
<object id="11" x="1014" y="-42">
<properties>
<property name="boundary_type" value="barrier"/>
</properties>
<polyline points="0,0 4,1110 24,1110 24,-8"/>
</object>
</objectgroup>
</map>

View File

@ -53,9 +53,15 @@ message PlayerDownsyncMeta {
double colliderRadius = 6;
}
message InputFrameDecoded {
int32 dx = 1;
int32 dy = 2;
int32 btnALevel = 3;
}
message InputFrameUpsync {
int32 inputFrameId = 1;
int32 encodedDir = 6;
uint64 encoded = 2;
}
message InputFrameDownsync {

View File

@ -1,309 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Bullet",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 5
},
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.7,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Node",
"_name": "Tail",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_level": 2,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-14,
-6,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 1,
"_custom": true,
"_file": {
"__uuid__": "b2687ac4-099e-403c-a192-ff477686f4f5"
},
"_spriteFrame": {
"__uuid__": "472df5d3-35e7-4184-9e6c-7f41bee65ee3"
},
"_texture": {
"__uuid__": "d0a82d39-bede-46c4-b698-c81ff0dedfff"
},
"_stopped": false,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 200,
"duration": -1,
"emissionRate": 999.999985098839,
"life": 0.20000000298023224,
"lifeVar": 0.5,
"_startColor": {
"__type__": "cc.Color",
"r": 202,
"g": 200,
"b": 86,
"a": 163
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 229,
"g": 255,
"b": 173,
"a": 198
},
"_endColor": {
"__type__": "cc.Color",
"r": 173,
"g": 161,
"b": 19,
"a": 214
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 107,
"g": 249,
"b": 249,
"a": 188
},
"angle": 360,
"angleVar": 360,
"startSize": 3.369999885559082,
"startSizeVar": 50,
"endSize": 30.31999969482422,
"endSizeVar": 0,
"startSpin": -47.369998931884766,
"startSpinVar": 0,
"endSpin": -47.369998931884766,
"endSpinVar": -142.11000061035156,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 7,
"y": 7
},
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": -1000,
"y": 0.5
},
"speed": 10,
"speedVar": 190.7899932861328,
"tangentialAccel": -92.11000061035156,
"tangentialAccelVar": 65.79000091552734,
"radialAccel": -671.0499877929688,
"radialAccelVar": 65.79000091552734,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "7673e0e4-bebd-4caa-8a10-a6e1e86f1b2f"
},
"fileId": "f8NGWnOBtGmZNTU+o6vnbe",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "2f525bb2-80d1-4508-bdc3-d03c11587ce4"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": {
"__uuid__": "266c6cef-32d6-4545-b3e6-c2b75a895578"
},
"_id": ""
},
{
"__type__": "ea9650l7IJHjL2ymsB5gasO",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"localIdInBattle": null,
"linearSpeed": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "7673e0e4-bebd-4caa-8a10-a6e1e86f1b2f"
},
"fileId": "f7AuVG6IFIr5KrEg6RCeY2",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "7673e0e4-bebd-4caa-8a10-a6e1e86f1b2f",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -13,7 +13,7 @@
},
{
"__type__": "cc.Node",
"_name": "Player1",
"_name": "Root",
"_objFlags": 0,
"_parent": null,
"_children": [
@ -25,25 +25,22 @@
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 11
"__id__": 19
},
{
"__id__": 12
},
{
"__id__": 13
},
{
"__id__": 14
"__id__": 20
}
],
"_prefab": {
"__id__": 15
"__id__": 21
},
"_opacity": 255,
"_color": {
@ -192,7 +189,7 @@
"__id__": 1
},
"asset": {
"__uuid__": "8a738d50-1dac-4b6e-99e1-d241f5ee7169"
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "5apzDmIE9IuaMOyF3z06sc",
"sync": false
@ -366,7 +363,7 @@
"__id__": 1
},
"asset": {
"__uuid__": "8a738d50-1dac-4b6e-99e1-d241f5ee7169"
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "04uxaznclAmLRL13XKszPJ",
"sync": false
@ -475,11 +472,319 @@
"__id__": 1
},
"asset": {
"__uuid__": "8a738d50-1dac-4b6e-99e1-d241f5ee7169"
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "e4mum5GwxNiZ0T8ouw95jJ",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "animNode",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 12
},
{
"__id__": 15
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 18
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "SoldierElf",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 13
}
],
"_prefab": {
"__id__": 14
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "SoldierElf",
"_animationName": "Idle1",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "affcd973-4743-48e5-9bcd-339180a6101b#24d7bb8f-577c-4e5d-b730-56613ca8685d",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "affcd973-4743-48e5-9bcd-339180a6101b"
},
"_N$dragonAtlasAsset": {
"__uuid__": "24d7bb8f-577c-4e5d-b730-56613ca8685d"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "3fs20Yd8dIO68/1Wx2oVLh",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "SoldierFireGhost",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 16
}
],
"_prefab": {
"__id__": 17
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "SoldierFireGhost",
"_animationName": "Idle1",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "36230012-8df3-4e85-afad-76ec47d0e4d7#4a9187d5-a9ad-4464-a03c-d2f3cc277051",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "36230012-8df3-4e85-afad-76ec47d0e4d7"
},
"_N$dragonAtlasAsset": {
"__uuid__": "4a9187d5-a9ad-4464-a03c-d2f3cc277051"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 8,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "a8ZUEyoP1Ec5azSkL7Z/9h",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "7aN7Gcc/tBw5EGlTJVBj2+",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
@ -506,52 +811,6 @@
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "28194c48-ae3b-4197-8263-0d474ae8b9bc"
},
"_clips": [
{
"__uuid__": "28194c48-ae3b-4197-8263-0d474ae8b9bc"
},
{
"__uuid__": "e1c45a36-2022-4b18-a2db-b5e2e0a120ed"
},
{
"__uuid__": "126dff26-0ace-439d-89b5-b888aa52d159"
},
{
"__uuid__": "95c2d541-8f99-446a-a7e0-094130ce6d41"
},
{
"__uuid__": "380f5fa0-f77f-434a-8f39-d545ee6823c5"
},
{
"__uuid__": "a306c6de-ccd8-492b-bfec-c6be0a4cbde2"
},
{
"__uuid__": "f496072b-51fd-4406-abbd-9885ac23f7a9"
},
{
"__uuid__": "6405ad8b-3084-4b67-8c2e-9b4d34fa3d09"
},
{
"__uuid__": "af16cdcb-6e82-4be6-806d-9fc52ae99fff"
},
{
"__uuid__": "02eba566-4d22-4fa7-99d7-f032f5845421"
}
],
"playOnLoad": true,
"_id": ""
},
{
"__type__": "b74b05YDqZFRo4OkZRFZX8k",
"_name": "",
@ -560,8 +819,10 @@
"__id__": 1
},
"_enabled": true,
"animComp": null,
"lastMovedAt": 0,
"animNode": {
"__id__": 11
},
"arrowTipNode": {
"__id__": 8
},
@ -570,30 +831,13 @@
},
"_id": ""
},
{
"__type__": "cc.CircleCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_radius": 12,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "8a738d50-1dac-4b6e-99e1-d241f5ee7169"
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "4cx75uwJJFa7U8QL187QCL",
"sync": false

View File

@ -1,6 +1,6 @@
{
"ver": "1.2.5",
"uuid": "8a738d50-1dac-4b6e-99e1-d241f5ee7169",
"uuid": "59bff7a2-23e1-4d69-bce7-afb37eae196a",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,

View File

@ -1,153 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "GuardTower",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_state": 0,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "31a63530-7811-45bc-a4ee-571faf917e35"
},
"fileId": "cb43NtzzhP0bpzlQHRRrkX",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "31a63530-7811-45bc-a4ee-571faf917e35",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,601 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "Player2",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 12
},
{
"__id__": 13
},
{
"__id__": 14
}
],
"_prefab": {
"__id__": 15
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 120,
"height": 120
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
3,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 2,
"groupIndex": 2,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "CoordinateLabel",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 46.68,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-5,
50,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "(0, 0)",
"_N$string": "(0, 0)",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f479636-9eb8-4612-8f97-371964d6eae3"
},
"fileId": "5apzDmIE9IuaMOyF3z06sc",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "particlesystem",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 1,
"_custom": true,
"_file": {
"__uuid__": "b2687ac4-099e-403c-a192-ff477686f4f5"
},
"_spriteFrame": {
"__uuid__": "472df5d3-35e7-4184-9e6c-7f41bee65ee3"
},
"_texture": null,
"_stopped": false,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 200,
"duration": -1,
"emissionRate": 999.999985098839,
"life": 0.20000000298023224,
"lifeVar": 0.5,
"_startColor": {
"__type__": "cc.Color",
"r": 202,
"g": 200,
"b": 86,
"a": 163
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 229,
"g": 255,
"b": 173,
"a": 198
},
"_endColor": {
"__type__": "cc.Color",
"r": 173,
"g": 161,
"b": 19,
"a": 214
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 107,
"g": 249,
"b": 249,
"a": 188
},
"angle": 360,
"angleVar": 360,
"startSize": 3.369999885559082,
"startSizeVar": 50,
"endSize": 30.31999969482422,
"endSizeVar": 0,
"startSpin": -47.369998931884766,
"startSpinVar": 0,
"endSpin": -47.369998931884766,
"endSpinVar": -142.11000061035156,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 7,
"y": 7
},
"_positionType": 1,
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": 0.25,
"y": 0.8600000143051147
},
"speed": 0,
"speedVar": 190.7899932861328,
"tangentialAccel": -92.11000061035156,
"tangentialAccelVar": 65.79000091552734,
"radialAccel": -671.0499877929688,
"radialAccelVar": 65.79000091552734,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f479636-9eb8-4612-8f97-371964d6eae3"
},
"fileId": "04uxaznclAmLRL13XKszPJ",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "arrowTip",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 76,
"height": 84
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
177,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a2170e4c-df31-41ef-be73-f4f605e75821"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f479636-9eb8-4612-8f97-371964d6eae3"
},
"fileId": "6bwyYXs/lD7ba69sgDrsn5",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "115ea7bb-d47f-4d3c-a52a-f46584346c3f"
},
"_clips": [
{
"__uuid__": "a1bf7c7c-b9f7-4b65-86e3-f86a9e798fb6"
},
{
"__uuid__": "115ea7bb-d47f-4d3c-a52a-f46584346c3f"
},
{
"__uuid__": "d5af527a-9f0c-4398-b2dd-84426be7bd32"
},
{
"__uuid__": "b60618d7-569d-4f13-bdeb-f20341fbadb6"
},
{
"__uuid__": "0b3fb38e-9110-4191-9b72-6b64a224d049"
},
{
"__uuid__": "1bc6de53-800b-4da3-ab8e-4a45e3aa4230"
},
{
"__uuid__": "ee0d670c-893e-4e4d-96dd-5571db18ee97"
},
{
"__uuid__": "596df84a-2e4e-4f1d-967c-a82649f564a8"
},
{
"__uuid__": "8acc4e9f-3c47-4b66-9a9d-d012709680f6"
},
{
"__uuid__": "c7cda0cd-dbce-4722-abd2-aeca28263a21"
}
],
"playOnLoad": true,
"_id": ""
},
{
"__type__": "b74b05YDqZFRo4OkZRFZX8k",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"animComp": null,
"lastMovedAt": 0,
"arrowTipNode": {
"__id__": 8
},
"coordLabel": {
"__id__": 3
},
"_id": ""
},
{
"__type__": "cc.CircleCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_radius": 12,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f479636-9eb8-4612-8f97-371964d6eae3"
},
"fileId": "4cx75uwJJFa7U8QL187QCL",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "1f479636-9eb8-4612-8f97-371964d6eae3",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,118 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_rawFiles": null,
"data": {
"__id__": 1
}
},
{
"__type__": "cc.Node",
"_name": "PolygonBoundaryBarrier",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_id": "",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 1,
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
]
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "e6gF9LdulAgYGTgO3/Pye8",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "4154eec0-d644-482f-a889-c00ae6b69958",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,125 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "PolygonBoundaryShelter",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 4,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-192,
43,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f820a6ec-e7a9-46cf-9b8a-331aa3e21487"
},
"fileId": "f8scmoFllMboAtkaldeiym",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "f820a6ec-e7a9-46cf-9b8a-331aa3e21487",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,125 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "PolygonBoundaryShelterZReducer",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 3,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": "e6q3kwlllDC425mW1I4/O5"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a36d024b-a979-4d18-b089-19af313ffb82"
},
"fileId": "fajJ28qMxI0YDyTCPlWINd",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "a36d024b-a979-4d18-b089-19af313ffb82",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,132 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "TiledAnim",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56,
"height": 58
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "cc1486e4-5c38-4a73-a0d3-70416d0dd57f"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_id": ""
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_defaultClip": null,
"_clips": [],
"playOnLoad": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1c02b0a0-859a-4467-86b3-ca39c30d1e19"
},
"fileId": "60dCvhukpIsL1FtdnqBIor",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "1c02b0a0-859a-4467-86b3-ca39c30d1e19",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,157 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "treasureNodePrefab",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
441,
814,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "350fd890-3d28-4e53-9dfa-1bf00d857737"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_id": ""
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "9f340a31-ddfa-46c2-94c7-d11615aedcb1"
},
"fileId": "dc8aAweIBDDYuXBJblR5IA",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "9f340a31-ddfa-46c2-94c7-d11615aedcb1",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,167 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "treasureNodePrefab",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 64,
"height": 64
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "5eea6zlA0NHdoCk/M1pvQmb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "ec3f3234-9b84-43c2-a3cd-58b924cce8e5"
},
"fileId": "dc8aAweIBDDYuXBJblR5IA",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "ec3f3234-9b84-43c2-a3cd-58b924cce8e5",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -80,20 +80,20 @@
],
"_active": true,
"_components": [
{
"__id__": 31
},
{
"__id__": 32
},
{
"__id__": 33
},
{
"__id__": 34
},
{
"__id__": 35
},
{
"__id__": 36
},
{
"__id__": 37
},
{
"__id__": 38
}
],
"_prefab": null,
@ -234,7 +234,7 @@
"__id__": 7
},
{
"__id__": 33
"__id__": 30
}
],
"_prefab": null,
@ -307,23 +307,11 @@
"canvasNode": {
"__id__": 2
},
"tiledAnimPrefab": {
"__uuid__": "1c02b0a0-859a-4467-86b3-ca39c30d1e19"
},
"player1Prefab": {
"__uuid__": "8a738d50-1dac-4b6e-99e1-d241f5ee7169"
},
"player2Prefab": {
"__uuid__": "1f479636-9eb8-4612-8f97-371964d6eae3"
},
"polygonBoundaryBarrierPrefab": {
"__uuid__": "4154eec0-d644-482f-a889-c00ae6b69958"
},
"keyboardInputControllerNode": {
"__id__": 8
"controlledCharacterPrefab": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"joystickInputControllerNode": {
"__id__": 22
"__id__": 8
},
"confirmLogoutPrefab": {
"__uuid__": "8e8c1a65-623d-42ba-97a7-820ce518ea11"
@ -335,7 +323,7 @@
"__id__": 17
},
"countdownLabel": {
"__id__": 30
"__id__": 23
},
"resultPanelPrefab": {
"__uuid__": "c4cfe3bd-c59e-4d5b-95cb-c933b120e184"
@ -353,28 +341,26 @@
"__uuid__": "b4e519f4-e698-4403-9ff2-47b8dacb077e"
},
"forceBigEndianFloatingNumDecoding": false,
"backgroundMapTiledIns": {
"__id__": 4
},
"renderFrameIdLagTolerance": 4,
"teleportEps1D": 0.001,
"jigglingEps1D": 0.001,
"_id": "d12gkAmppNlIzqcRDELa91"
},
{
"__type__": "cc.Node",
"_name": "KeyboardControlsMount",
"_name": "JoystickContainer",
"_objFlags": 0,
"_parent": {
"__id__": 9
},
"_children": [],
"_children": [
{
"__id__": 24
}
],
"_active": true,
"_components": [
{
"__id__": 31
},
{
"__id__": 32
"__id__": 29
}
],
"_prefab": null,
@ -388,8 +374,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 50.4
"width": 1280,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -400,8 +386,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-341.33333,
-640,
0,
-500,
0,
0,
0,
@ -423,7 +409,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e6nL+1zEhLmLSaT8R/9UgD"
"_id": "81iBXkC0lFt5FFUUD0k3xE"
},
{
"__type__": "cc.Node",
@ -441,9 +427,6 @@
},
{
"__id__": 22
},
{
"__id__": 29
}
],
"_active": true,
@ -539,7 +522,7 @@
"array": [
0,
0,
342.9460598986377,
239.32248305180272,
0,
0,
0,
@ -1041,325 +1024,6 @@
"_N$affectedByScale": false,
"_id": "f6GkgYwn9JvKLqbGG1zmeD"
},
{
"__type__": "cc.Node",
"_name": "JoystickContainer",
"_objFlags": 0,
"_parent": {
"__id__": 9
},
"_children": [
{
"__id__": 23
}
],
"_active": true,
"_components": [
{
"__id__": 28
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-500,
0,
0,
0,
0,
1,
0.66667,
0.66667,
0.66667
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "81iBXkC0lFt5FFUUD0k3xE"
},
{
"__type__": "cc.Node",
"_name": "JoystickBG",
"_objFlags": 0,
"_parent": {
"__id__": 22
},
"_children": [
{
"__id__": 24
}
],
"_active": true,
"_components": [
{
"__id__": 26
},
{
"__id__": 27
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 400
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "88u3wQvvdO8pbrNWhs3ifP"
},
{
"__type__": "cc.Node",
"_name": "Joystick",
"_objFlags": 0,
"_parent": {
"__id__": 23
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.8,
0.8,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eybpdW/JK3aDeXxdE86VD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7d4baacd-294c-4a5d-9cd6-5d36e4394c9e"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "7dr8DOX01K7YFqWlRy1ATp"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "447f7cfe-e678-4424-be03-0afdab8659de"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "b28Bh9ZcpM+7K3Bd3bmNf0"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 40,
"_right": 0,
"_top": 0,
"_bottom": 10,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c0cEsj4LpMcZZEldELidxy"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 278,
"_right": 480.0000000000002,
"_top": 544,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 480,
"_originalHeight": 0,
"_id": "2cxYjEIwNO6rUtXX4WcfnV"
},
{
"__type__": "cc.Node",
"_name": "CountdownSeconds",
@ -1371,7 +1035,7 @@
"_active": true,
"_components": [
{
"__id__": 30
"__id__": 23
}
],
"_prefab": null,
@ -1427,7 +1091,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
"__id__": 22
},
"_enabled": true,
"_materials": [
@ -1453,11 +1117,142 @@
"_id": "dfxSFl+shLcY+0v45FJtGo"
},
{
"__type__": "cc.Label",
"__type__": "cc.Node",
"_name": "JoystickBG",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [
{
"__id__": 25
}
],
"_active": true,
"_components": [
{
"__id__": 27
},
{
"__id__": 28
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 400
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "88u3wQvvdO8pbrNWhs3ifP"
},
{
"__type__": "cc.Node",
"_name": "Joystick",
"_objFlags": 0,
"_parent": {
"__id__": 24
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 26
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.8,
0.8,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eybpdW/JK3aDeXxdE86VD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 25
},
"_enabled": true,
"_materials": [
@ -1465,32 +1260,114 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "9cS5BRd+NKJIvGQiojJtIs"
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7d4baacd-294c-4a5d-9cd6-5d36e4394c9e"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "7dr8DOX01K7YFqWlRy1ATp"
},
{
"__type__": "4561aFzv9JPZLe6iIzODk2d",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "447f7cfe-e678-4424-be03-0afdab8659de"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "b28Bh9ZcpM+7K3Bd3bmNf0"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 40,
"_right": 0,
"_top": 0,
"_bottom": 10,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c0cEsj4LpMcZZEldELidxy"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_id": "5ahzSYC8pCCLVPCBYyCRfZ"
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 278,
"_right": 480.0000000000002,
"_top": 544,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 480,
"_originalHeight": 0,
"_id": "2cxYjEIwNO6rUtXX4WcfnV"
},
{
"__type__": "09e1b/tEy5K2qaPIpqHDbae",
@ -1600,16 +1477,17 @@
},
"_enabled": true,
"translationListenerNode": {
"__id__": 22
"__id__": 8
},
"zoomingListenerNode": {
"__id__": 5
},
"actionBtnListenerNode": null,
"stickhead": {
"__id__": 24
"__id__": 25
},
"base": {
"__id__": 23
"__id__": 24
},
"joyStickEps": 0.1,
"magicLeanLowerBound": 0.414,

View File

@ -440,7 +440,7 @@
"array": [
0,
0,
343.804582419974,
239.32248305180272,
0,
0,
0,

View File

@ -0,0 +1,971 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "368b10b6-88fc-423c-9fcd-545d9fc673bd"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 9
}
],
"_active": true,
"_components": [
{
"__id__": 19
},
{
"__id__": 20
},
{
"__id__": 21
},
{
"__id__": 22
},
{
"__id__": 23
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1024,
"height": 1920
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
512,
960,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "daDUxCjRFEHak7fx7LvgSJ"
},
{
"__type__": "cc.Node",
"_name": "Map",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
},
{
"__id__": 5
},
{
"__id__": 6
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 3200,
"height": 3200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "79f0Sv9OVGwbY3M3efHnGf"
},
{
"__type__": "cc.TiledMap",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_tmxFile": null,
"_id": "c8MqKDLJdKz7VhPwMjScDw"
},
{
"__type__": "09e1b/tEy5K2qaPIpqHDbae",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"BGMEffect": {
"__uuid__": "64a79efa-97de-4cb5-b2a9-01500c60573a"
},
"crashedByTrapBullet": {
"__uuid__": "1d604e42-8cee-466f-884d-e74cae21ce3b"
},
"highScoreTreasurePicked": {
"__uuid__": "0164d22c-d965-461f-867e-b30e2d56cc5c"
},
"treasurePicked": {
"__uuid__": "7704b97e-6367-420c-b7af-d0750a2bbb30"
},
"countDown10SecToEnd": {
"__uuid__": "261d1d7d-a5cc-4cb7-a737-194427055fd4"
},
"mapNode": {
"__id__": 3
},
"_id": "3crA1nz5xPSLAnCSLQIPOq"
},
{
"__type__": "47d7dy4S4lB2pxqJJlGOoai",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"canvasNode": {
"__id__": 2
},
"controlledCharacterPrefab": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"joystickInputControllerNode": {
"__id__": 7
},
"confirmLogoutPrefab": null,
"simplePressToGoDialogPrefab": null,
"boundRoomIdLabel": null,
"countdownLabel": null,
"resultPanelPrefab": null,
"gameRulePrefab": null,
"findingPlayerPrefab": null,
"countdownToBeginGamePrefab": null,
"playersInfoPrefab": null,
"forceBigEndianFloatingNumDecoding": false,
"renderFrameIdLagTolerance": 4,
"jigglingEps1D": 0.001,
"_id": "4b+kZ46VhC0LCBixXEK2dk"
},
{
"__type__": "cc.Node",
"_name": "JoystickContainer",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [
{
"__id__": 13
}
],
"_active": true,
"_components": [
{
"__id__": 18
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-500,
0,
0,
0,
0,
1,
0.66667,
0.66667,
0.66667
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "81iBXkC0lFt5FFUUD0k3xE"
},
{
"__type__": "cc.Node",
"_name": "WidgetsAboveAll",
"_objFlags": 0,
"_parent": {
"__id__": 9
},
"_children": [
{
"__id__": 7
},
{
"__id__": 11
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "c6fPdAUURDX69j0zTeIFZv"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 10
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
239.32248305180272,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "76BOk0enxN+b20dtIJ3uk2"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1.5,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_alignWithScreen": true,
"_id": "50qiPTLS9NhbPa+JZU0jOP"
},
{
"__type__": "cc.Node",
"_name": "CountdownSeconds",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 88.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
591,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f6HMd9ebFPppe/Lu0Ry/qk"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 70,
"_lineHeight": 70,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "dfxSFl+shLcY+0v45FJtGo"
},
{
"__type__": "cc.Node",
"_name": "JoystickBG",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 14
}
],
"_active": true,
"_components": [
{
"__id__": 16
},
{
"__id__": 17
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 400
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "88u3wQvvdO8pbrNWhs3ifP"
},
{
"__type__": "cc.Node",
"_name": "Joystick",
"_objFlags": 0,
"_parent": {
"__id__": 13
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.8,
0.8,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eybpdW/JK3aDeXxdE86VD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7d4baacd-294c-4a5d-9cd6-5d36e4394c9e"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "7dr8DOX01K7YFqWlRy1ATp"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "447f7cfe-e678-4424-be03-0afdab8659de"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "b28Bh9ZcpM+7K3Bd3bmNf0"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 40,
"_right": 0,
"_top": 0,
"_bottom": 10,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c0cEsj4LpMcZZEldELidxy"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 278,
"_right": 480.0000000000002,
"_top": 544,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 480,
"_originalHeight": 0,
"_id": "2cxYjEIwNO6rUtXX4WcfnV"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1024,
"height": 1920
},
"_fitWidth": true,
"_fitHeight": false,
"_id": "94aSq7GcJJZ7A6IzMerm1J"
},
{
"__type__": "8ac08Cb+Y1M/6ZsO9niGOzW",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"map": {
"__id__": 3
},
"_id": "84o2sgpN1NRqlN9x7mSzBj"
},
{
"__type__": "78830/HTiVJoaf8n504g/J4",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"mapNode": {
"__id__": 3
},
"speed": 5000,
"_id": "76ImpM7XtPSbiLHDXdsJa+"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 6240,
"_right": -4000,
"_top": -8320,
"_bottom": 10880,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 960,
"_originalHeight": 640,
"_id": "a8lQ6mB8RMRajCXQCzw1kG"
},
{
"__type__": "d34e3c4jd5NqYtg8ltL9QST",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"translationListenerNode": {
"__id__": 7
},
"zoomingListenerNode": {
"__id__": 3
},
"stickhead": {
"__id__": 14
},
"base": {
"__id__": 13
},
"joyStickEps": 0.1,
"magicLeanLowerBound": 0.414,
"magicLeanUpperBound": 2.414,
"linearScaleFacBase": 1,
"minScale": 1,
"maxScale": 2,
"maxMovingBufferLength": 1,
"zoomingScaleFacBase": 0.1,
"zoomingSpeedBase": 4,
"linearSpeedBase": 320,
"canvasNode": {
"__id__": 2
},
"mapNode": {
"__id__": 3
},
"linearMovingEps": 0.1,
"scaleByEps": 0.0375,
"_id": "e9oVYTr7ROlpp/IrNjBUmR"
}
]

View File

@ -0,0 +1,7 @@
{
"ver": "1.2.5",
"uuid": "368b10b6-88fc-423c-9fcd-545d9fc673bd",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@ -0,0 +1,60 @@
const BaseCharacter = require("./BaseCharacter");
window.ATK_CHARACTER_STATE = {
Idle1: [0, "Idle1"],
Walking: [1, "Walking"],
Atk1: [2, "Atk1"],
};
cc.Class({
extends: BaseCharacter,
properties: {
animNode: {
type: cc.Node,
default: null
},
},
ctor() {
this.speciesName = null;
},
setSpecies(speciesName) {
this.speciesName = speciesName;
this.effAnimNode = this.animNode.getChildByName(this.speciesName);
this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
this.animComp.playAnimation(ATK_CHARACTER_STATE.Idle1[1]);
this.effAnimNode.active = true;
},
onLoad() {
BaseCharacter.prototype.onLoad.call(this);
this.characterState = ATK_CHARACTER_STATE.Idle1[0];
},
scheduleNewDirection(newScheduledDirection, forceAnimSwitch) {
BaseCharacter.prototype.scheduleNewDirection.call(this, newScheduledDirection, forceAnimSwitch);
if (ATK_CHARACTER_STATE.Atk1[0] == this.characterState) {
return;
}
let newCharacterState = ATK_CHARACTER_STATE.Idle1[0];
if (0 != newScheduledDirection.dx || 0 != newScheduledDirection.dy) {
newCharacterState = ATK_CHARACTER_STATE.Walking[0];
}
if (newCharacterState != this.characterState) {
switch (newCharacterState) {
case ATK_CHARACTER_STATE.Idle1[0]:
this.animComp.playAnimation(ATK_CHARACTER_STATE.Idle1[1]);
break;
case ATK_CHARACTER_STATE.Walking[0]:
this.animComp.playAnimation(ATK_CHARACTER_STATE.Walking[1]);
break;
default:
break;
}
this.characterState = newCharacterState;
}
},
});

View File

@ -1,6 +1,6 @@
{
"ver": "1.0.5",
"uuid": "ea965d25-ec82-478c-bdb2-9ac07981ab0e",
"uuid": "0b29c37b-2ac0-47be-ae68-b7b9a4b2dffb",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,

View File

@ -2,10 +2,6 @@ module.export = cc.Class({
extends: cc.Component,
properties: {
animComp: {
type: cc.Animation,
default: null,
},
lastMovedAt: {
type: cc.Float,
default: 0 // In "GMT milliseconds"
@ -21,24 +17,14 @@ module.export = cc.Class({
};
},
ctor() {},
onLoad() {
const self = this;
self.clips = {
'02': 'Top',
'0-2': 'Bottom',
'-20': 'Left',
'20': 'Right',
'-11': 'TopLeft',
'11': 'TopRight',
'-1-1': 'BottomLeft',
'1-1': 'BottomRight'
};
const canvasNode = self.mapNode.parent;
self.mapIns = self.mapNode.getComponent("Map");
const joystickInputControllerScriptIns = canvasNode.getComponent("TouchEventsManager");
self.ctrl = joystickInputControllerScriptIns;
self.animComp = self.node.getComponent(cc.Animation);
self.animComp.play();
},
scheduleNewDirection(newScheduledDirection, forceAnimSwitch) {
@ -48,19 +34,11 @@ module.export = cc.Class({
if (forceAnimSwitch || null == this.activeDirection || (newScheduledDirection.dx != this.activeDirection.dx || newScheduledDirection.dy != this.activeDirection.dy)) {
this.activeDirection = newScheduledDirection;
this.activeDirection = newScheduledDirection;
const clipKey = newScheduledDirection.dx.toString() + newScheduledDirection.dy.toString();
const clips = (this.attacked ? this.attackedClips : this.clips);
let clip = clips[clipKey];
if (!clip) {
// Keep playing the current anim.
if (0 !== newScheduledDirection.dx || 0 !== newScheduledDirection.dy) {
cc.warn('Clip for clipKey === ' + clipKey + ' is invalid: ' + clip + '.');
}
} else {
this.animComp.play(clip);
if (this.attacked) {
cc.log(`Attacked, switching to play clipKey = ${clipKey}, clip == ${clip}, this.activeDirection == ${JSON.stringify(this.activeDirection)}, this.activeDirection == ${JSON.stringify(this.activeDirection)}.`);
if (this.animComp && this.animComp.node) {
if (0 > newScheduledDirection.dx) {
this.animComp.node.scaleX = (-1.0);
} else if (0 < newScheduledDirection.dx) {
this.animComp.node.scaleX = (1.0);
}
}
}
@ -84,13 +62,4 @@ module.export = cc.Class({
this.speed = proposedSpeed;
},
startFrozenDisplay() {
const self = this;
self.attacked = true;
},
stopFrozenDisplay() {
const self = this;
self.attacked = false;
},
});

View File

@ -1,201 +0,0 @@
module.export = cc.Class({
extends: cc.Component,
properties: {
localIdInBattle: {
default: null,
},
linearSpeed: {
default: 0.0,
},
},
ctor() {
this.ctrl = null;
this.activeDirection = null;
},
onLoad() {
},
_calculateVecToMoveByWithChosenDir(elapsedTime, sDir) {
if (0 == sDir.dx && 0 == sDir.dy) {
return cc.v2();
}
const self = this;
const distanceToMove = (self.linearSpeed * elapsedTime);
const denominator = Math.sqrt(sDir.dx * sDir.dx + sDir.dy * sDir.dy);
const unitProjDx = (sDir.dx / denominator);
const unitProjDy = (sDir.dy / denominator);
return cc.v2(
distanceToMove * unitProjDx,
distanceToMove * unitProjDy,
);
},
_calculateVecToMoveBy(elapsedTime) {
const self = this;
if (null == self.activeDirection) {
return null;
}
// Note that `sDir` used in this method MUST BE a copy in RAM.
let sDir = {
dx: self.activeDirection.dx,
dy: self.activeDirection.dy,
};
if (0 == sDir.dx && 0 == sDir.dy) {
return cc.v2();
}
return self._calculateVecToMoveByWithChosenDir(elapsedTime, sDir);
},
_canMoveBy(vecToMoveBy) {
return true;
},
update(dt) {
// Used only for EXTRAPOLATING the position of this bullet. The position might be corrected within `setData` as well.
const self = this;
if (null != self.bulletMaxDist) {
const dxMoved = self.node.position.x - self.startAtPoint.x;
const dyMoved = self.node.position.y - self.startAtPoint.y;
const distanceMoved = Math.sqrt(dxMoved * dxMoved + dyMoved * dyMoved)
self.node.opacity = 255*(1 - distanceMoved/self.bulletMaxDist);
}
const vecToMoveBy = self._calculateVecToMoveBy(dt);
if (null == vecToMoveBy) {
return;
}
if (self._canMoveBy(vecToMoveBy)) {
self.node.position = self.node.position.add(vecToMoveBy);
}
},
_calculateAngle(dx, dy) {
if (dx == 0) {
if (dy > 0) {
return 90;
}
if (dy < 0) {
return -90;
}
}
if (dx > 0) {
if (dy == 0) {
return 0;
}
if (dy > 0) {
return 45;
}
if (dy < 0) {
return -45;
}
}
if (dx < 0) {
if (dy == 0) {
return 180;
}
if (dy > 0) {
return 135;
}
if (dy < 0) {
return -135;
}
}
return null;
},
setData(bulletLocalIdInBattle, bulletInfo, dtFromMapUpdate) {
const targetNode = this.node;
if (true == bulletInfo.removed) {
return false;
}
if (null == bulletInfo.startAtPoint || null == bulletInfo.endAtPoint) {
console.error(`Init bullet direction error, startAtPoint:${bulletInfo.startAtPoint}, endAtPoint:${bulletInfo.endAtPoint}`);
return false;
}
this.localIdInBattle = bulletLocalIdInBattle;
this.linearSpeed = bulletInfo.linearSpeed * 1000000000; // The `bullet.LinearSpeed` on server-side is denoted in pts/nanoseconds.
const dx = bulletInfo.endAtPoint.x - bulletInfo.startAtPoint.x;
const dy = bulletInfo.endAtPoint.y - bulletInfo.startAtPoint.y;
const discretizedDir = this.ctrl.discretizeDirection(dx, dy, this.ctrl.joyStickEps);
const baseAngle = 0;
const angleToRotate = baseAngle - this._calculateAngle(discretizedDir.dx, discretizedDir.dy);
if (null == angleToRotate) {
return false;
}
set2dRotation(targetNode, angleToRotate);
const newPos = cc.v2(
bulletInfo.x,
bulletInfo.y
);
if (null == this.activeDirection) {
// Initialization.
this.startAtPoint = bulletInfo.startAtPoint;
this.endAtPoint = bulletInfo.endAtPoint;
this.bulletMaxDist = 600.0; // Hardcoded temporarily, matching that in "<backend>/models/room.go". -- YFLu, 2019-09-05.
targetNode.setPosition(newPos);
this.activeDirection = {
dx: 0,
dy: 0,
};
return true;
}
const oldPos = cc.v2(
targetNode.x,
targetNode.y,
);
const toMoveByVec = newPos.sub(oldPos);
const toMoveByVecMag = toMoveByVec.mag();
const toTeleportDisThreshold = (this.linearSpeed * dtFromMapUpdate * 100);
const notToMoveDisThreshold = (this.linearSpeed * dtFromMapUpdate * 0.5);
if (toMoveByVecMag < notToMoveDisThreshold) {
// To stop extrapolated moving.
this.activeDirection = {
dx: 0,
dy: 0,
};
} else {
if (toMoveByVecMag > toTeleportDisThreshold) {
console.log("Bullet ", bulletLocalIdInBattle, " is teleporting! Having toMoveByVecMag == ", toMoveByVecMag, ", toTeleportDisThreshold == ", toTeleportDisThreshold);
// To stop extrapolated moving.
this.activeDirection = {
dx: 0,
dy: 0
};
// Deliberately NOT using `cc.Action`. -- YFLu, 2019-09-04
targetNode.setPosition(newPos);
} else {
// The common case which is suitable for interpolation.
const normalizedDir = {
dx: toMoveByVec.x / toMoveByVecMag,
dy: toMoveByVec.y / toMoveByVecMag,
};
if (isNaN(normalizedDir.dx) || isNaN(normalizedDir.dy)) {
this.activeDirection = {
dx: 0,
dy: 0,
};
} else {
this.activeDirection = normalizedDir;
}
}
}
return true;
},
});

View File

@ -1,8 +1,7 @@
const BasePlayer = require("./BasePlayer");
const AttackingCharacter = require("./AttackingCharacter");
cc.Class({
extends: BasePlayer,
// LIFE-CYCLE CALLBACKS:
extends: AttackingCharacter,
properties: {
arrowTipNode: {
type: cc.Node,
@ -14,21 +13,11 @@ cc.Class({
}
},
start() {
BasePlayer.prototype.start.call(this);
AttackingCharacter.prototype.start.call(this);
},
onLoad() {
BasePlayer.prototype.onLoad.call(this);
this.attackedClips = {
'01': 'attackedLeft',
'0-1': 'attackedRight',
'-20': 'attackedLeft',
'20': 'attackedRight',
'-21': 'attackedLeft',
'21': 'attackedRight',
'-2-1': 'attackedLeft',
'2-1': 'attackedRight'
};
AttackingCharacter.prototype.onLoad.call(this);
this.arrowTipNode.active = false;
if (!this.mapIns.showCriticalCoordinateLabels) {
@ -51,7 +40,7 @@ cc.Class({
},
update(dt) {
BasePlayer.prototype.update.call(this, dt);
AttackingCharacter.prototype.update.call(this, dt);
if (this.mapIns.showCriticalCoordinateLabels) {
this.coordLabel.string = `(${this.node.x.toFixed(2)}, ${this.node.y.toFixed(2)})`;
}

View File

@ -1,69 +0,0 @@
cc.Class({
extends: cc.Component,
properties: {},
setInputControls: function() {
const self = this;
// add keyboard event listener
// When there is a key being pressed down, judge if it's the designated directional button and set up acceleration in the corresponding direction
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, function(event) {
switch (event.keyCode) {
case cc.macro.KEY.w:
self.activeDirection.dPjY = +1.0;
break;
case cc.macro.KEY.s:
self.activeDirection.dPjY = -1.0;
break;
case cc.macro.KEY.a:
self.activeDirection.dPjX = -2.0;
break;
case cc.macro.KEY.d:
self.activeDirection.dPjX = +2.0;
break;
default:
break;
}
}, self.node);
// when releasing the button, stop acceleration in this direction
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, function(event) {
switch (event.keyCode) {
case cc.macro.KEY.w:
if (+1.0 == self.activeDirection.dPjY) {
self.activeDirection.dPjY = 0.0;
}
break;
case cc.macro.KEY.s:
if (-1.0 == self.activeDirection.dPjY) {
self.activeDirection.dPjY = 0.0;
}
break;
case cc.macro.KEY.a:
if (-2.0 == self.activeDirection.dPjX) {
self.activeDirection.dPjX = 0.0;
}
break;
case cc.macro.KEY.d:
if (+2.0 == self.activeDirection.dPjX) {
self.activeDirection.dPjX = 0.0;
}
break;
default:
break;
}
}, self.node);
},
// LIFE-CYCLE CALLBACKS:
onLoad() {
// Properties deliberately hidden from GUI panel.
this.activeDirection = {
dPjY: 0.0,
dPjX: 0.0
};
this.setInputControls();
}
});

View File

@ -40,26 +40,10 @@ cc.Class({
type: cc.Node,
default: null,
},
tiledAnimPrefab: {
controlledCharacterPrefab: {
type: cc.Prefab,
default: null,
},
player1Prefab: {
type: cc.Prefab,
default: null,
},
player2Prefab: {
type: cc.Prefab,
default: null,
},
polygonBoundaryBarrierPrefab: {
type: cc.Prefab,
default: null,
},
keyboardInputControllerNode: {
type: cc.Node,
default: null
},
joystickInputControllerNode: {
type: cc.Node,
default: null
@ -103,10 +87,6 @@ cc.Class({
forceBigEndianFloatingNumDecoding: {
default: false,
},
backgroundMapTiledIns: {
type: cc.TiledMap,
default: null
},
renderFrameIdLagTolerance: {
type: cc.Integer,
default: 4 // implies (renderFrameIdLagTolerance >> inputScaleFrames) count of inputFrameIds
@ -183,8 +163,8 @@ cc.Class({
return [previousSelfInput, existingInputFrame.inputList[joinIndex - 1]];
}
const prefabbedInputList = (null == previousInputFrameDownsyncWithPrediction ? new Array(self.playerRichInfoDict.size).fill(0) : previousInputFrameDownsyncWithPrediction.inputList.slice());
const discreteDir = self.ctrl.getDiscretizedDirection();
prefabbedInputList[(joinIndex - 1)] = discreteDir.encodedIdx;
const currSelfInput = self.ctrl.getEncodedInput();
prefabbedInputList[(joinIndex - 1)] = currSelfInput;
const prefabbedInputFrameDownsync = {
inputFrameId: inputFrameId,
inputList: prefabbedInputList,
@ -193,7 +173,7 @@ cc.Class({
self.dumpToInputCache(prefabbedInputFrameDownsync); // A prefabbed inputFrame, would certainly be adding a new inputFrame to the cache, because server only downsyncs "all-confirmed inputFrames"
return [previousSelfInput, discreteDir.encodedIdx];
return [previousSelfInput, currSelfInput];
},
shouldSendInputFrameUpsyncBatch(prevSelfInput, currSelfInput, lastUpsyncInputFrameId, currInputFrameId) {
@ -224,7 +204,7 @@ cc.Class({
} else {
const inputFrameUpsync = {
inputFrameId: i,
encodedDir: inputFrameDownsync.inputList[self.selfPlayerInfo.joinIndex - 1],
encoded: inputFrameDownsync.inputList[self.selfPlayerInfo.joinIndex - 1],
};
inputFrameUpsyncBatch.push(inputFrameUpsync);
}
@ -304,8 +284,6 @@ cc.Class({
const self = this;
const mapNode = self.node;
const canvasNode = mapNode.parent;
self.countdownLabel.string = "";
self.countdownNanos = null;
// Clearing previous info of all players. [BEGINS]
self.collisionPlayerIndexPrefix = (1 << 17); // For tracking the movements of players
@ -339,12 +317,20 @@ cc.Class({
self.battleState = ALL_BATTLE_STATES.WAITING;
if (self.countdownLabel) {
self.countdownLabel.string = "";
}
self.countdownNanos = null;
if (self.findingPlayerNode) {
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.init();
}
if (self.playersInfoNode) {
safelyAddChild(self.widgetsAboveAllNode, self.playersInfoNode);
}
if (self.findingPlayerNode) {
safelyAddChild(self.widgetsAboveAllNode, self.findingPlayerNode);
}
},
onLoad() {
@ -352,7 +338,7 @@ cc.Class({
window.mapIns = self;
window.forceBigEndianFloatingNumDecoding = self.forceBigEndianFloatingNumDecoding;
self.showCriticalCoordinateLabels = true;
self.showCriticalCoordinateLabels = false;
console.warn("+++++++ Map onLoad()");
window.handleClientSessionError = function() {
@ -476,7 +462,9 @@ cc.Class({
const x0 = boundaryObj.anchor.x,
y0 = boundaryObj.anchor.y;
const newBarrier = self.collisionSys.createPolygon(x0, y0, Array.from(boundaryObj, p => { return [p.x, p.y]; }));
const newBarrier = self.collisionSys.createPolygon(x0, y0, Array.from(boundaryObj, p => {
return [p.x, p.y];
}));
if (self.showCriticalCoordinateLabels) {
for (let i = 0; i < boundaryObj.length; ++i) {
@ -500,7 +488,7 @@ cc.Class({
barrierVertLabelNode.setPosition(cc.v2(wx, wy));
const barrierVertLabel = barrierVertLabelNode.addComponent(cc.Label);
barrierVertLabel.fontSize = 12;
barrierVertLabel.lineHeight = barrierVertLabel.fontSize+1;
barrierVertLabel.lineHeight = barrierVertLabel.fontSize + 1;
barrierVertLabel.string = `(${wx.toFixed(1)}, ${wy.toFixed(1)})`;
safelyAddChild(self.node, barrierVertLabelNode);
setLocalZOrder(barrierVertLabelNode, 5);
@ -620,11 +608,13 @@ cc.Class({
self._initPlayerRichInfoDict(players, playerMetas);
// Show the top status indicators for IN_BATTLE
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
}
}
self.renderFrameId = rdf.id;
self.lastRenderFrameIdTriggeredAt = performance.now();
@ -641,7 +631,7 @@ cc.Class({
const canvasNode = self.canvasNode;
self.ctrl = canvasNode.getComponent("TouchEventsManager");
self.enableInputControls();
if (self.countdownToBeginGameNode.parent) {
if (self.countdownToBeginGameNode && self.countdownToBeginGameNode.parent) {
self.countdownToBeginGameNode.parent.removeChild(self.countdownToBeginGameNode);
}
self.transitToState(ALL_MAP_STATES.VISUAL);
@ -762,11 +752,20 @@ cc.Class({
spawnPlayerNode(joinIndex, vx, vy, playerRichInfo) {
const self = this;
const newPlayerNode = 1 == joinIndex ? cc.instantiate(self.player1Prefab) : cc.instantiate(self.player2Prefab); // hardcoded for now, car color determined solely by joinIndex
const newPlayerNode = cc.instantiate(self.controlledCharacterPrefab)
const playerScriptIns = newPlayerNode.getComponent("ControlledCharacter");
if (1 == joinIndex) {
playerScriptIns.setSpecies("SoldierElf");
} else if (2 == joinIndex) {
playerScriptIns.setSpecies("SoldierFireGhost");
playerScriptIns.animComp.node.scaleX = (-1.0);
}
const wpos = self.virtualGridToWorldPos(vx, vy);
newPlayerNode.setPosition(cc.v2(wpos[0], wpos[1]));
newPlayerNode.getComponent("SelfPlayer").mapNode = self.node;
playerScriptIns.mapNode = self.node;
const cpos = self.virtualGridToPlayerColliderPos(vx, vy, playerRichInfo);
const d = playerRichInfo.colliderRadius * 2,
x0 = cpos[0],
@ -781,7 +780,6 @@ cc.Class({
setLocalZOrder(newPlayerNode, 5);
newPlayerNode.active = true;
const playerScriptIns = newPlayerNode.getComponent("SelfPlayer");
playerScriptIns.scheduleNewDirection({
dx: playerRichInfo.dir.dx,
dy: playerRichInfo.dir.dy
@ -945,23 +943,29 @@ cc.Class({
self._initPlayerRichInfoDict(players, playerMetas);
// Show the top status indicators for IN_BATTLE
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
}
}
console.log("Calling `onBattleReadyToStart` with:", playerMetas);
if (self.findingPlayerNode) {
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.hideExitButton();
findingPlayerScriptIns.updatePlayersInfo(playerMetas);
}
// Delay to hide the "finding player" GUI, then show a countdown clock
if (self.countdownToBeginGameNode) {
window.setTimeout(() => {
self.hideFindingPlayersGUI();
const countDownScriptIns = self.countdownToBeginGameNode.getComponent("CountdownToBeginGame");
countDownScriptIns.setData();
self.showPopupInCanvas(self.countdownToBeginGameNode);
}, 1500);
}
},
applyRoomDownsyncFrameDynamics(rdf) {
@ -973,13 +977,13 @@ cc.Class({
const dx = (wpos[0] - playerRichInfo.node.x);
const dy = (wpos[1] - playerRichInfo.node.y);
const justJiggling = (self.jigglingEps1D >= Math.abs(dx) && self.jigglingEps1D >= Math.abs(dy));
if (!justJiggling) {
//if (!justJiggling) {
playerRichInfo.node.setPosition(wpos[0], wpos[1]);
playerRichInfo.virtualGridX = immediatePlayerInfo.virtualGridX;
playerRichInfo.virtualGridY = immediatePlayerInfo.virtualGridY;
playerRichInfo.scriptIns.scheduleNewDirection(immediatePlayerInfo.dir, false);
playerRichInfo.scriptIns.updateSpeed(immediatePlayerInfo.speed);
}
//}
});
},
@ -1035,8 +1039,7 @@ cc.Class({
const playerCollider = collisionSysMap.get(collisionPlayerIndex);
const player = currRenderFrame.players[playerId];
const encodedInput = inputList[joinIndex - 1];
const decodedInput = self.ctrl.decodeDirection(encodedInput);
const decodedInput = self.ctrl.decodeInput(inputList[joinIndex - 1]);
// console.log(`Got non-zero inputs for playerId=${playerId}, decodedInput=${JSON.stringify(decodedInput)} @currRenderFrame.id=${currRenderFrame.id}, delayedInputFrame.id=${delayedInputFrame.id}`);
/*

View File

@ -1,326 +0,0 @@
const COLLISION_WITH_PLAYER_STATE = {
WALKING_COLLIDABLE: 0,
STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM: 1,
STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM: 2,
STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM: 3,
STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM: 4,
STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM: 5,
STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM: 6,
WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER: 7,
STILL_NEAR_NOBODY_PLAYING_ANIM: 8,
};
const STILL_NEAR_SELF_PLAYER_STATE_SET = new Set();
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM);
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM);
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM);
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM);
const STILL_NEAR_OTHER_PLAYER_STATE_SET = new Set();
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM);
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM);
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM);
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM);
const STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET = new Set();
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM);
function transitWalkingConditionallyCollidableToUnconditionallyCollidable(currentCollisionWithPlayerState) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE;
}
return currentCollisionWithPlayerState;
}
function transitUponSelfPlayerLeftProximityArea(currentCollisionWithPlayerState) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER;
}
return currentCollisionWithPlayerState;
}
function transitDueToNoBodyInProximityArea(currentCollisionWithPlayerState) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER;
}
return currentCollisionWithPlayerState;
}
function transitToPlayingStunnedAnim(currentCollisionWithPlayerState, dueToSelfPlayer, dueToOtherPlayer) {
if (dueToSelfPlayer) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE:
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM;
}
}
if (dueToOtherPlayer) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM;
}
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
function transitDuringPlayingStunnedAnim(currentCollisionWithPlayerState, dueToSelfPlayerComesIntoProximity, dueToOtherPlayerComesIntoProximity) {
if (dueToSelfPlayerComesIntoProximity) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM;
}
}
if (dueToOtherPlayerComesIntoProximity) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM;
}
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
function transitStunnedAnimPlayingToPlayed(currentCollisionWithPlayerState, forceNotCollidableWithOtherPlayer) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM:
return (true == forceNotCollidableWithOtherPlayer ? COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER : COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE);
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
function transitStunnedAnimPlayedToWalking(currentCollisionWithPlayerState) {
/*
* Intentionally NOT transiting for
*
* - STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM, or
* - STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM,
*
* which should be transited upon leaving of "SelfPlayer".
*/
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER;
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
const BasePlayer = require("./BasePlayer");
cc.Class({
extends: BasePlayer,
// LIFE-CYCLE CALLBACKS:
start() {
BasePlayer.prototype.start.call(this);
this.scheduleNewDirection(this._generateRandomDirection());
},
onLoad() {
BasePlayer.prototype.onLoad.call(this);
const self = this;
this.collisionWithPlayerState = COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE;
this.clips = {
'01': 'FlatHeadSisterRunTop',
'0-1': 'FlatHeadSisterRunBottom',
'-20': 'FlatHeadSisterRunLeft',
'20': 'FlatHeadSisterRunRight',
'-21': 'FlatHeadSisterRunTopLeft',
'21': 'FlatHeadSisterRunTopRight',
'-2-1': 'FlatHeadSisterRunBottomLeft',
'2-1': 'FlatHeadSisterRunBottomRight'
};
self.onStunnedAnimPlayedSafe = () => {
const oldCollisionWithPlayerState = self.collisionWithPlayerState;
self.collisionWithPlayerState = transitStunnedAnimPlayingToPlayed(this.collisionWithPlayerState, true);
if (oldCollisionWithPlayerState == self.collisionWithPlayerState || !self.node) return;
self.scheduleNewDirection(self._generateRandomDirection());
self.collisionWithPlayerState = transitStunnedAnimPlayedToWalking(self.collisionWithPlayerState);
setTimeout(() => {
self.collisionWithPlayerState = transitWalkingConditionallyCollidableToUnconditionallyCollidable(self.collisionWithPlayerState);
}, 5000);
};
self.onStunnedAnimPlayedSafeAction = cc.callFunc(self.onStunnedAnimPlayedSafe, self);
self.playStunnedAnim = () => {
let colliededAction1 = cc.rotateTo(0.2, -15);
let colliededAction2 = cc.rotateTo(0.3, 15);
let colliededAction3 = cc.rotateTo(0.2, 0);
self.node.runAction(cc.sequence(
cc.callFunc(() => {
self.player.pause()
}, self),
colliededAction1,
colliededAction2,
colliededAction3,
cc.callFunc(() => {
self.player.resume()
}, self),
self.onStunnedAnimPlayedSafeAction
));
// NOTE: Use <cc.Animation>.on('stop', self.onStunnedAnimPlayedSafe) if necessary.
}
},
_canMoveBy(vecToMoveBy) {
if (COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER != this.collisionWithPlayerState && COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE != this.collisionWithPlayerState) {
return false;
}
const superRet = BasePlayer.prototype._canMoveBy.call(this, vecToMoveBy);
const self = this;
const computedNewDifferentPosLocalToParentWithinCurrentFrame = self.node.position.add(vecToMoveBy);
const currentSelfColliderCircle = self.node.getComponent("cc.CircleCollider");
let nextSelfColliderCircle = null;
if (0 < self.contactedBarriers.length || 0 < self.contactedNPCPlayers.length || 0 < self.contactedControlledPlayers) {
/* To avoid unexpected buckling. */
const mutatedVecToMoveBy = vecToMoveBy.mul(2);
nextSelfColliderCircle = {
position: self.node.position.add(vecToMoveBy.mul(2)).add(currentSelfColliderCircle.offset),
radius: currentSelfColliderCircle.radius,
};
} else {
nextSelfColliderCircle = {
position: computedNewDifferentPosLocalToParentWithinCurrentFrame.add(currentSelfColliderCircle.offset),
radius: currentSelfColliderCircle.radius,
};
}
for (let aCircleCollider of self.contactedControlledPlayers) {
let contactedCircleLocalToParentWithinCurrentFrame = {
position: aCircleCollider.node.position.add(aCircleCollider.offset),
radius: aCircleCollider.radius,
};
if (cc.Intersection.circleCircle(contactedCircleLocalToParentWithinCurrentFrame, nextSelfColliderCircle)) {
return false;
}
}
return superRet;
},
update(dt) {
BasePlayer.prototype.update.call(this, dt);
},
onCollisionEnter(other, self) {
BasePlayer.prototype.onCollisionEnter.call(this, other, self);
const playerScriptIns = self.getComponent(self.node.name);
switch (other.node.name) {
case "SelfPlayer":
playerScriptIns._addContactedControlledPlayers(other);
if (1 == playerScriptIns.contactedControlledPlayers.length) {
// When "SelfPlayer" comes into proximity area.
if (!STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.has(playerScriptIns.collisionWithPlayerState)) {
playerScriptIns.collisionWithPlayerState = transitToPlayingStunnedAnim(playerScriptIns.collisionWithPlayerState, true, false);
playerScriptIns.playStunnedAnim();
} else {
playerScriptIns.collisionWithPlayerState = transitDuringPlayingStunnedAnim(playerScriptIns.collisionWithPlayerState, true, false);
}
}
break;
case "NPCPlayer":
if (1 == playerScriptIns.contactedNPCPlayers.length) {
// When one of the other "OtherPlayer"s comes into proximity area.
if (!STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.has(playerScriptIns.collisionWithPlayerState)) {
const oldState = playerScriptIns.collisionWithPlayerState;
playerScriptIns.collisionWithPlayerState = transitToPlayingStunnedAnim(oldState, false, true);
if (playerScriptIns.collisionWithPlayerState != oldState) {
playerScriptIns.playStunnedAnim();
}
} else {
playerScriptIns.collisionWithPlayerState = transitDuringPlayingStunnedAnim(playerScriptIns.collisionWithPlayerState, false, true);
}
}
break;
default:
break;
}
},
onCollisionStay(other, self) {
// TBD.
},
onCollisionExit(other, self) {
BasePlayer.prototype.onCollisionExit.call(this, other, self);
const playerScriptIns = self.getComponent(self.node.name);
switch (other.node.name) {
case "SelfPlayer":
playerScriptIns._removeContactedControlledPlayer(other);
if (0 == playerScriptIns.contactedControlledPlayers.length) {
// Special release step.
if (STILL_NEAR_SELF_PLAYER_STATE_SET.has(playerScriptIns.collisionWithPlayerState)) {
playerScriptIns.collisionWithPlayerState = transitUponSelfPlayerLeftProximityArea(playerScriptIns.collisionWithPlayerState);
}
}
if (0 == playerScriptIns.contactedControlledPlayers.length && 0 == playerScriptIns.contactedNPCPlayers.length) {
transitDueToNoBodyInProximityArea(playerScriptIns.collisionWithPlayerState);
}
break;
case "NPCPlayer":
if (0 == playerScriptIns.contactedControlledPlayers.length && 0 == playerScriptIns.contactedNPCPlayers.length) {
transitDueToNoBodyInProximityArea(playerScriptIns.collisionWithPlayerState);
}
break;
default:
break;
}
},
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "17759956-1f8c-421f-bac2-7f4dd7ccdcda",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,208 @@
const i18n = require('LanguageData');
i18n.init(window.language); // languageID should be equal to the one we input in New Language ID input field
const OnlineMap = require('./Map');
cc.Class({
extends: OnlineMap,
onDestroy() {
console.warn("+++++++ Map onDestroy()");
},
spawnPlayerNode(joinIndex, vx, vy, playerRichInfo) {
const self = this;
const newPlayerNode = cc.instantiate(self.controlledCharacterPrefab)
const playerScriptIns = newPlayerNode.getComponent("ControlledCharacter");
if (1 == joinIndex) {
playerScriptIns.setSpecies("SoldierElf");
} else if (2 == joinIndex) {
playerScriptIns.setSpecies("SoldierFireGhost");
playerScriptIns.animComp.node.scaleX = (-1.0);
}
const wpos = self.virtualGridToWorldPos(vx, vy);
newPlayerNode.setPosition(cc.v2(wpos[0], wpos[1]));
playerScriptIns.mapNode = self.node;
const cpos = self.virtualGridToPlayerColliderPos(vx, vy, playerRichInfo);
const d = playerRichInfo.colliderRadius * 2,
x0 = cpos[0],
y0 = cpos[1];
let pts = [[0, 0], [d, 0], [d, d], [0, d]];
const newPlayerCollider = self.collisionSys.createPolygon(x0, y0, pts);
const collisionPlayerIndex = self.collisionPlayerIndexPrefix + joinIndex;
self.collisionSysMap.set(collisionPlayerIndex, newPlayerCollider);
safelyAddChild(self.node, newPlayerNode);
setLocalZOrder(newPlayerNode, 5);
newPlayerNode.active = true;
playerScriptIns.scheduleNewDirection({
dx: playerRichInfo.dir.dx,
dy: playerRichInfo.dir.dy
}, true);
return [newPlayerNode, playerScriptIns];
},
onLoad() {
const self = this;
window.mapIns = self;
cc.director.getCollisionManager().enabled = false;
const mapNode = self.node;
const canvasNode = mapNode.parent;
self.mainCameraNode = self.canvasNode.getChildByName("Main Camera");
self.mainCamera = self.mainCameraNode.getComponent(cc.Camera);
for (let child of self.mainCameraNode.children) {
child.setScale(1 / self.mainCamera.zoomRatio);
}
self.widgetsAboveAllNode = self.mainCameraNode.getChildByName("WidgetsAboveAll");
self.mainCameraNode.setPosition(cc.v2());
/** Init required prefab ended. */
self.inputDelayFrames = 8;
self.inputScaleFrames = 2;
self.inputFrameUpsyncDelayTolerance = 2;
self.rollbackEstimatedDt = 0.016667;
self.rollbackEstimatedDtMillis = 16.667;
self.rollbackEstimatedDtNanos = 16666666;
self.maxChasingRenderFramesPerUpdate = 5;
self.worldToVirtualGridRatio = 1000;
self.virtualGridToWorldRatio = 1.0 / self.worldToVirtualGridRatio;
const tiledMapIns = self.node.getComponent(cc.TiledMap);
const fullPathOfTmxFile = cc.js.formatStr("map/%s/map", "dungeon");
cc.loader.loadRes(fullPathOfTmxFile, cc.TiledMapAsset, (err, tmxAsset) => {
if (null != err) {
console.error(err);
return;
}
tiledMapIns.tmxAsset = null;
mapNode.removeAllChildren();
self._resetCurrentMatch();
tiledMapIns.tmxAsset = tmxAsset;
const newMapSize = tiledMapIns.getMapSize();
const newTileSize = tiledMapIns.getTileSize();
self.node.setContentSize(newMapSize.width * newTileSize.width, newMapSize.height * newTileSize.height);
self.node.setPosition(cc.v2(0, 0));
let barrierIdCounter = 0;
const boundaryObjs = tileCollisionManager.extractBoundaryObjects(self.node);
for (let boundaryObj of boundaryObjs.barriers) {
const x0 = boundaryObj.anchor.x,
y0 = boundaryObj.anchor.y;
const newBarrier = self.collisionSys.createPolygon(x0, y0, Array.from(boundaryObj, p => {
return [p.x, p.y];
}));
if (self.showCriticalCoordinateLabels) {
for (let i = 0; i < boundaryObj.length; ++i) {
const barrierVertLabelNode = new cc.Node();
switch (i % 4) {
case 0:
barrierVertLabelNode.color = cc.Color.RED;
break;
case 1:
barrierVertLabelNode.color = cc.Color.GRAY;
break;
case 2:
barrierVertLabelNode.color = cc.Color.BLACK;
break;
default:
barrierVertLabelNode.color = cc.Color.MAGENTA;
break;
}
const wx = boundaryObj.anchor.x + boundaryObj[i].x,
wy = boundaryObj.anchor.y + boundaryObj[i].y;
barrierVertLabelNode.setPosition(cc.v2(wx, wy));
const barrierVertLabel = barrierVertLabelNode.addComponent(cc.Label);
barrierVertLabel.fontSize = 12;
barrierVertLabel.lineHeight = barrierVertLabel.fontSize + 1;
barrierVertLabel.string = `(${wx.toFixed(1)}, ${wy.toFixed(1)})`;
safelyAddChild(self.node, barrierVertLabelNode);
setLocalZOrder(barrierVertLabelNode, 5);
barrierVertLabelNode.active = true;
}
}
// console.log("Created barrier: ", newBarrier);
++barrierIdCounter;
const collisionBarrierIndex = (self.collisionBarrierIndexPrefix + barrierIdCounter);
self.collisionSysMap.set(collisionBarrierIndex, newBarrier);
}
const startRdf = {
id: window.MAGIC_ROOM_DOWNSYNC_FRAME_ID.BATTLE_START,
players: {
10: {
id: 10,
joinIndex: 2,
virtualGridX: 0,
virtualGridY: 0,
speed: 2 * self.worldToVirtualGridRatio,
dir: {
dx: 0,
dy: 0
}
},
},
playerMetas: {
10: {
colliderRadius: 12,
},
}
};
self.selfPlayerInfo = {
id: 10
};
self._initPlayerRichInfoDict(startRdf.players, startRdf.playerMetas);
self.onRoomDownsyncFrame(startRdf);
self.battleState = ALL_BATTLE_STATES.IN_BATTLE;
});
},
update(dt) {
const self = this;
if (ALL_BATTLE_STATES.IN_BATTLE == self.battleState) {
const elapsedMillisSinceLastFrameIdTriggered = performance.now() - self.lastRenderFrameIdTriggeredAt;
if (elapsedMillisSinceLastFrameIdTriggered < (self.rollbackEstimatedDtMillis)) {
// console.debug("Avoiding too fast frame@renderFrameId=", self.renderFrameId, ": elapsedMillisSinceLastFrameIdTriggered=", elapsedMillisSinceLastFrameIdTriggered);
return;
}
try {
let st = performance.now();
let prevSelfInput = null,
currSelfInput = null;
const noDelayInputFrameId = self._convertToInputFrameId(self.renderFrameId, 0); // It's important that "inputDelayFrames == 0" here
if (self.shouldGenerateInputFrameUpsync(self.renderFrameId)) {
const prevAndCurrInputs = self._generateInputFrameUpsync(noDelayInputFrameId);
prevSelfInput = prevAndCurrInputs[0];
currSelfInput = prevAndCurrInputs[1];
}
const rdf = self.rollbackAndChase(self.renderFrameId, self.renderFrameId + 1, self.collisionSys, self.collisionSysMap, false);
self.applyRoomDownsyncFrameDynamics(rdf);
let t3 = performance.now();
} catch (err) {
console.error("Error during Map.update", err);
} finally {
++self.renderFrameId; // [WARNING] It's important to increment the renderFrameId AFTER all the operations above!!!
}
}
},
});

View File

@ -1,6 +1,6 @@
{
"ver": "1.0.5",
"uuid": "4561a173-bfd2-4f64-b7ba-888cce0e4d9d",
"uuid": "47d7dcb8-4b89-41da-9c6a-2499463a86a2",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,

View File

@ -1,13 +0,0 @@
const Bullet = require("./Bullet");
cc.Class({
extends: Bullet,
// LIFE-CYCLE CALLBACKS:
properties: {
},
onLoad() {
Bullet.prototype.onLoad.call(this);
},
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "c3bb6519-af90-4641-bb5e-5abbbcdfa6da",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -94,6 +94,12 @@ cc.Class({
onLoad() {
this.cachedStickHeadPosition = cc.v2(0.0, 0.0);
this.cachedBtnUpLevel = 0;
this.cachedBtnDownLevel = 0;
this.cachedBtnLeftLevel = 0;
this.cachedBtnRightLevel = 0;
this.cachedBtnALevel = 0;
this.canvasNode = this.mapNode.parent;
this.mainCameraNode = this.canvasNode.getChildByName("Main Camera"); // Cannot drag and assign the `mainCameraNode` from CocosCreator EDITOR directly, otherwise it'll cause an infinite loading time, till v2.1.0.
this.mainCamera = this.mainCameraNode.getComponent(cc.Camera);
@ -143,6 +149,51 @@ cc.Class({
self._touchEndEvent(event);
});
zoomingListenerNode.inTouchPoints = new Map();
// Setup keyboard controls for the ease of attach debugging
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, function(evt) {
switch (evt.keyCode) {
case cc.macro.KEY.w:
self.cachedBtnUpLevel = 1;
break;
case cc.macro.KEY.s:
self.cachedBtnDownLevel = 1;
break;
case cc.macro.KEY.a:
self.cachedBtnLeftLevel = 1;
break;
case cc.macro.KEY.d:
self.cachedBtnRightLevel = 1;
break;
case cc.macro.KEY.h:
self.cachedBtnALevel = 1;
break;
default:
break;
}
}, this);
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, function(evt) {
switch (evt.keyCode) {
case cc.macro.KEY.w:
self.cachedBtnUpLevel = 0;
break;
case cc.macro.KEY.s:
self.cachedBtnDownLevel = 0;
break;
case cc.macro.KEY.a:
self.cachedBtnLeftLevel = 0;
break;
case cc.macro.KEY.d:
self.cachedBtnRightLevel = 0;
break;
case cc.macro.KEY.h:
self.cachedBtnALevel = 0;
break;
default:
break;
}
}, this);
},
_isMapOverMoved(mapTargetPos) {
@ -239,7 +290,6 @@ cc.Class({
// TODO: Handle single-finger-click event.
} while (false);
this.cachedStickHeadPosition = cc.v2(0.0, 0.0);
for (let touch of event._touches) {
if (touch) {
theListenerNode.inTouchPoints.delete(touch._id);
@ -252,7 +302,42 @@ cc.Class({
update(dt) {
if (this.inMultiTouch) return;
if (true != this.initialized) return;
const self = this;
// Keyboard takes top priority
let keyboardDiffVec = cc.v2(0, 0);
if (1 == this.cachedBtnUpLevel) {
if (1 == this.cachedBtnLeftLevel) {
keyboardDiffVec = cc.v2(-1.0, +1.0);
} else if (1 == this.cachedBtnRightLevel) {
keyboardDiffVec = cc.v2(+1.0, +1.0);
} else {
keyboardDiffVec = cc.v2(0.0, +1.0);
}
} else if (1 == this.cachedBtnDownLevel) {
if (1 == this.cachedBtnLeftLevel) {
keyboardDiffVec = cc.v2(-1.0, -1.0);
} else if (1 == this.cachedBtnRightLevel) {
keyboardDiffVec = cc.v2(+1.0, -1.0);
} else {
keyboardDiffVec = cc.v2(0.0, -1.0);
}
} else if (1 == this.cachedBtnLeftLevel) {
keyboardDiffVec = cc.v2(-1.0, 0.0);
} else if (1 == this.cachedBtnRightLevel) {
keyboardDiffVec = cc.v2(+1.0, 0.0);
}
if (0 != keyboardDiffVec.x || 0 != keyboardDiffVec.y) {
this.cachedStickHeadPosition = keyboardDiffVec.mul(this.maxHeadDistance / keyboardDiffVec.mag());
}
this.stickhead.setPosition(this.cachedStickHeadPosition);
const translationListenerNode = (self.translationListenerNode ? self.translationListenerNode : self.mapNode);
if (0 == translationListenerNode.inTouchPoints.size
&&
(0 == keyboardDiffVec.x && 0 == keyboardDiffVec.y)
) {
this.cachedStickHeadPosition = cc.v2(0, 0); // Important reset!
}
},
discretizeDirection(continuousDx, continuousDy, eps) {
@ -312,18 +397,23 @@ cc.Class({
return ret;
},
decodeDirection(encodedDirection) {
const mapped = window.DIRECTION_DECODER[encodedDirection];
if (null == mapped) {
console.error("Unexpected encodedDirection = ", encodedDirection);
}
return {
dx: mapped[0],
dy: mapped[1],
};
getEncodedInput() {
const discretizedDir = this.discretizeDirection(this.stickhead.x, this.stickhead.y, this.joyStickEps).encodedIdx; // There're only 9 dirs, thus using only the lower 4-bits
const btnALevel = (this.cachedBtnALevel << 4);
return (btnALevel + discretizedDir);
},
getDiscretizedDirection() {
return this.discretizeDirection(this.cachedStickHeadPosition.x, this.cachedStickHeadPosition.y, this.joyStickEps);
decodeInput(encodedInput) {
const encodedDirection = (encodedInput & 0xf);
const mappedDirection = window.DIRECTION_DECODER[encodedDirection];
if (null == mappedDirection) {
console.error("Unexpected encodedDirection = ", encodedDirection);
}
const btnALevel = ((encodedInput >> 4) & 1);
return {
dx: mappedDirection[0],
dy: mappedDirection[1],
a: btnALevel,
};
},
});

View File

@ -1,26 +0,0 @@
window.LOW_SCORE_TREASURE_TYPE = 1;
window.HIGH_SCORE_TREASURE_TYPE = 2;
window.LOW_SCORE_TREASURE_SCORE = 100;
window.HIGH_SCORE_TREASURE_SCORE = 200;
cc.Class({
extends: cc.Component,
properties: {
},
setData (treasureInfo) {
const self = this;
this.score = treasureInfo.score;
this.type = treasureInfo.type;
this.treasureInfo = treasureInfo;
const spriteComponent = this.node.getComponent(cc.Sprite);
const targetGid = (window.LOW_SCORE_TREASURE_TYPE == treasureInfo.type ? window.battleEntityTypeNameToGlobalGid["LowScoreTreasure"] : window.battleEntityTypeNameToGlobalGid["HighScoreTreasure"])
spriteComponent.spriteFrame = window.getOrCreateSpriteFrameForGid(targetGid).spriteFrame;
},
start() {},
})

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "5eea6ce5-0343-4776-80a4-fccd69bd099b",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -1,84 +0,0 @@
cc.Class({
extends: cc.Component,
properties: {
pickedUpAnimNode: {
type: cc.Node,
default: null
},
durationMillis: {
default: 0
},
binglingAnimNode: {
type: cc.Node,
default: null
},
binglingAnimDurationMillis: {
default: 0
},
scoreLabelNode: {
type: cc.Node,
default: null
}
},
setData (treasureInfo) {
const self = this;
this.score = treasureInfo.score ? treasureInfo.score : 100 ;
this.type = treasureInfo.type ? treasureInfo.type : 1;
this.scoreLabelNode.getComponent(cc.Label).string = this.score;
const spriteComponent = this.pickedUpAnimNode.getComponent(cc.Sprite);
//hardcode treasurePNG's path.
cc.loader.loadRes("textures/treasures/"+ this.type, cc.SpriteFrame, function (err, frame) {
if(err){
cc.warn(err);
return;
}
spriteComponent.spriteFrame = frame;
})
},
// LIFE-CYCLE CALLBACKS:
update (dt) {
const changingNode = this.pickedUpAnimNode;
const elapsedMillis = Date.now() - this.startedAtMillis;
if(elapsedMillis >= this.binglingAnimDurationMillis && null != this.binglingAnimNode && true == this.binglingAnimNode.active) {
this.binglingAnimNode.active = false;
this.startedAtMillis = Date.now();
}
if(this.binglingAnimNode.active)
return;
if (elapsedMillis > this.durationMillis) {
this.node.destroy();
return;
}
if (elapsedMillis <= this.firstDurationMillis) {
let posDiff = cc.v2(0, dt * this.yIncreaseSpeed);
changingNode.setPosition(changingNode.position.add(posDiff));
this.scoreLabelNode.setPosition(this.scoreLabelNode.position.add(posDiff));
changingNode.scale += (this.scaleIncreaseSpeed*dt);
} else {
let posDiff = cc.v2(dt * this.xIncreaseSpeed , ( -1 *dt * this.yDecreaseSpeed));
changingNode.setPosition(changingNode.position.add(posDiff));
this.scoreLabelNode.setPosition(this.scoreLabelNode.position.add(posDiff));
changingNode.opacity -= dt * this.opacityDegradeSpeed;
this.scoreLabelNode.opacity -= dt * this.opacityDegradeSpeed;
}
},
onLoad() {
this.pickedUpAnimNode.scale = 0;
this.startedAtMillis = Date.now();
this.firstDurationMillis = (0.8*this.durationMillis);
this.yIncreaseSpeed = (200 *1000/this.firstDurationMillis);
this.scaleIncreaseSpeed = (2 * 1000/this.firstDurationMillis);
this.scondDurationMillis = (0.2 * this.durationMillis );
this.opacityDegradeSpeed = (255*1000/this.scondDurationMillis);
this.yDecreaseSpeed = (30*1000/this.scondDurationMillis);
this.xIncreaseSpeed = (20*1000/this.scondDurationMillis);
}
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "697ef72c-27ee-4184-9ae3-885808d58153",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -1,28 +0,0 @@
const BasePlayer = require("./BasePlayer");
cc.Class({
extends: BasePlayer,
// LIFE-CYCLE CALLBACKS:
start() {
BasePlayer.prototype.start.call(this);
},
onLoad() {
BasePlayer.prototype.onLoad.call(this);
this.clips = {
'01': 'FlatHeadSisterRunTop',
'0-1': 'FlatHeadSisterRunBottom',
'-20': 'FlatHeadSisterRunLeft',
'20': 'FlatHeadSisterRunRight',
'-21': 'FlatHeadSisterRunTopLeft',
'21': 'FlatHeadSisterRunTopRight',
'-2-1': 'FlatHeadSisterRunBottomLeft',
'2-1': 'FlatHeadSisterRunBottomRight'
};
},
update(dt) {
},
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "233a1795-0de3-4d7c-9ce6-c5736ade723f",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}