AR视频direction文件相关调整
This commit is contained in:
parent
d876c20def
commit
17c2a44e40
2169
Assets/Models/ViewPlayer 1.controller
Normal file
2169
Assets/Models/ViewPlayer 1.controller
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/Models/ViewPlayer 1.controller.meta
Normal file
8
Assets/Models/ViewPlayer 1.controller.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70932625440497e46bc3a3618405fd63
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -95,6 +95,9 @@ AnimatorStateTransition:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 1
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: canturn
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3705284127588475039}
|
||||
m_Solo: 0
|
||||
@ -229,6 +232,9 @@ AnimatorStateTransition:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 1
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: canturn
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 152988074441697560}
|
||||
m_Solo: 0
|
||||
@ -1143,67 +1149,73 @@ AnimatorController:
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: speed
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: power
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: cadance
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: preSpeed
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: grade
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: touchHead
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: headBack
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: cadanceConnected
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: cadance 0
|
||||
m_Type: 3
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: drinking
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: canturn
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
|
||||
Binary file not shown.
@ -1,97 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aca272262570a0f4390fe4d286641bf6
|
||||
ModelImporter:
|
||||
serializedVersion: 19301
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2169
Assets/NV_Models/ViewPlayer_NV 1.controller
Normal file
2169
Assets/NV_Models/ViewPlayer_NV 1.controller
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/NV_Models/ViewPlayer_NV 1.controller.meta
Normal file
8
Assets/NV_Models/ViewPlayer_NV 1.controller.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f591654b7b9ce143beccb1395c3d77b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2181
Assets/NV_Models/ViewPlayer_NV.controller
Normal file
2181
Assets/NV_Models/ViewPlayer_NV.controller
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/NV_Models/ViewPlayer_NV.controller.meta
Normal file
8
Assets/NV_Models/ViewPlayer_NV.controller.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40c2bdf62605796489f38b74fb4a8739
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -6,6 +6,84 @@ ModelImporter:
|
||||
- first:
|
||||
74: 1827226128182048838
|
||||
second: Take 001
|
||||
- first:
|
||||
74: -5405653242291790180
|
||||
second: Start_NV
|
||||
- first:
|
||||
74: 9015088021872159937
|
||||
second: RideLoop_NV
|
||||
- first:
|
||||
74: -9208175103127145895
|
||||
second: TurnLeft_NV
|
||||
- first:
|
||||
74: 4854180139978558704
|
||||
second: TurnLeftLoop_NV
|
||||
- first:
|
||||
74: 1389121407789637250
|
||||
second: TurnLeftBack_NV
|
||||
- first:
|
||||
74: 4353825163953427278
|
||||
second: TurnRight_NV
|
||||
- first:
|
||||
74: 3672910778998720083
|
||||
second: Take 001 (5)
|
||||
- first:
|
||||
74: -3956177450704724540
|
||||
second: Take 001 (6)
|
||||
- first:
|
||||
74: -6331134858367440422
|
||||
second: TurnRightLoop_NV
|
||||
- first:
|
||||
74: 4703272541985079310
|
||||
second: TurnRightBack_NV
|
||||
- first:
|
||||
74: 9067093048684652814
|
||||
second: StandToEven
|
||||
- first:
|
||||
74: -2304705367301635330
|
||||
second: FastToStand
|
||||
- first:
|
||||
74: 9166450028386467682
|
||||
second: EvenToStand_NV
|
||||
- first:
|
||||
74: 2575632172523718194
|
||||
second: EvenToFast
|
||||
- first:
|
||||
74: 2651805550911614328
|
||||
second: StandToEven_NV
|
||||
- first:
|
||||
74: -331316755806882020
|
||||
second: FastToStand_NV
|
||||
- first:
|
||||
74: -7161687316715503316
|
||||
second: EvenToFast_NV
|
||||
- first:
|
||||
74: -3740697505954044128
|
||||
second: FastToEven_NV
|
||||
- first:
|
||||
74: 9067093048684652814
|
||||
second: StandToFast_NV
|
||||
- first:
|
||||
74: -1316105579242099164
|
||||
second: StandRideLoop_NV
|
||||
- first:
|
||||
74: -1462537046989903752
|
||||
second: FastRideLoop_NV
|
||||
- first:
|
||||
74: -7991033621053369466
|
||||
second: Drinking_NV
|
||||
- first:
|
||||
74: -8060218615734211237
|
||||
second: HeadBack_NV
|
||||
- first:
|
||||
74: -3291206362154003629
|
||||
second: Stop_NV
|
||||
- first:
|
||||
74: 5921554141564574142
|
||||
second: TouchHead_NV
|
||||
- first:
|
||||
74: 1465369574596688972
|
||||
second: Win_NV
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 1
|
||||
@ -33,7 +111,645 @@ ModelImporter:
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
clipAnimations:
|
||||
- serializedVersion: 16
|
||||
name: Take 001
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 0
|
||||
lastFrame: 1447
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: Start_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 70
|
||||
lastFrame: 115
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: RideLoop_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 244
|
||||
lastFrame: 291
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: TurnLeft_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 853
|
||||
lastFrame: 875
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: TurnLeftLoop_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 875
|
||||
lastFrame: 897
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: TurnLeftBack_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 897
|
||||
lastFrame: 922
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: TurnRight_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 922
|
||||
lastFrame: 944
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: TurnRightLoop_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 944
|
||||
lastFrame: 966
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: TurnRightBack_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 966
|
||||
lastFrame: 991
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: StandToEven_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 1100
|
||||
lastFrame: 1125
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: FastToStand_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 1130
|
||||
lastFrame: 1153
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: EvenToStand_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 1160
|
||||
lastFrame: 1185
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: EvenToFast_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 1190
|
||||
lastFrame: 1215
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: FastToEven_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 221
|
||||
lastFrame: 244
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: StandToFast_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 155
|
||||
lastFrame: 180
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: StandRideLoop_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 115
|
||||
lastFrame: 155
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: FastRideLoop_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 180
|
||||
lastFrame: 221
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: Drinking_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 291
|
||||
lastFrame: 520
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: HeadBack_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 1375
|
||||
lastFrame: 1447
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: Stop_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 995
|
||||
lastFrame: 1021
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: TouchHead_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 1021
|
||||
lastFrame: 1090
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
- serializedVersion: 16
|
||||
name: Win_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 520
|
||||
lastFrame: 766
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 0
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
|
||||
@ -5,7 +5,7 @@ ModelImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
74: 1827226128182048838
|
||||
second: Take 001
|
||||
second: Idle_NV
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 1
|
||||
@ -33,7 +33,36 @@ ModelImporter:
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
clipAnimations:
|
||||
- serializedVersion: 16
|
||||
name: Idle_NV
|
||||
takeName: Take 001
|
||||
internalID: 0
|
||||
firstFrame: 0
|
||||
lastFrame: 70
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
|
||||
@ -60,7 +60,7 @@ public class RecommendController : MonoBehaviour
|
||||
break;
|
||||
case 1:
|
||||
var res = await ConfigHelper.mapApi.GetMapRouteAreaDetailItem(Area.AreaId);
|
||||
UIManager.ShowNewRouteDetailPanel(res.data.Id);
|
||||
UIManager.ShowNewRouteDetailPanel(res.data.Id, res.data.CoverImage);
|
||||
break;
|
||||
case 2:
|
||||
await ConfigHelper.activityApi.JoinActivity(Area.ActivityId ?? 0);
|
||||
|
||||
BIN
Assets/Resources/Images/GameRoom/RACE-BG.png
Normal file
BIN
Assets/Resources/Images/GameRoom/RACE-BG.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 MiB |
128
Assets/Resources/Images/GameRoom/RACE-BG.png.meta
Normal file
128
Assets/Resources/Images/GameRoom/RACE-BG.png.meta
Normal file
@ -0,0 +1,128 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92b2af17f8a6342469252fd00dcce09e
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: -1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22245
Assets/Resources/UI/Prefab/AR/OnlineVideoPlayer.prefab
Normal file
22245
Assets/Resources/UI/Prefab/AR/OnlineVideoPlayer.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1548c79bb3e64274092e567ab24758e2
|
||||
guid: 296d4f939237c3a4dbf2c4a25af2bd52
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb4e905420fe1d34cb14fd221ce96fc3
|
||||
guid: f252938bffbfb64419b5575463a1160e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
22242
Assets/Resources/UI/Prefab/AR/VidePlayer.prefab
Normal file
22242
Assets/Resources/UI/Prefab/AR/VidePlayer.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Resources/UI/Prefab/AR/VidePlayer.prefab.meta
Normal file
7
Assets/Resources/UI/Prefab/AR/VidePlayer.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f1ee6ee391e2724eac09441d6da8a03
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
7
Assets/Resources/UI/Prefab/AR/VidePlayer_NV.prefab.meta
Normal file
7
Assets/Resources/UI/Prefab/AR/VidePlayer_NV.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a12b8c86d5082e41a4d1fabc11c6a29
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -966,9 +966,7 @@ MonoBehaviour:
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 'Cancel
|
||||
|
||||
'
|
||||
m_Text: Cancel
|
||||
--- !u!114 &4262002136419357740
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1766,7 +1764,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 20, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 34}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &4262002137219612041
|
||||
|
||||
@ -364,7 +364,7 @@ RectTransform:
|
||||
- {fileID: 130627680016309576}
|
||||
- {fileID: 130627679597843477}
|
||||
m_Father: {fileID: 130627679731738850}
|
||||
m_RootOrder: 10
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@ -1145,9 +1145,9 @@ RectTransform:
|
||||
- {fileID: 9062609704636061302}
|
||||
- {fileID: 5927133371388494270}
|
||||
- {fileID: 130627679516412300}
|
||||
- {fileID: 130627679431431431}
|
||||
- {fileID: 1295357821348885756}
|
||||
- {fileID: 130627679949777537}
|
||||
- {fileID: 130627679431431431}
|
||||
m_Father: {fileID: 130627679118995922}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -1526,7 +1526,7 @@ RectTransform:
|
||||
- {fileID: 130627680369723509}
|
||||
- {fileID: 130627680722365076}
|
||||
m_Father: {fileID: 130627679731738850}
|
||||
m_RootOrder: 9
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@ -7025,7 +7025,7 @@ RectTransform:
|
||||
- {fileID: 4449242911132044866}
|
||||
- {fileID: 2048985411796200136}
|
||||
m_Father: {fileID: 130627679731738850}
|
||||
m_RootOrder: 8
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
|
||||
@ -33729,7 +33729,7 @@ MonoBehaviour:
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Favorite
|
||||
m_Text: AR
|
||||
--- !u!114 &8359135443754166559
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -1,32 +1,33 @@
|
||||
347~663:-3
|
||||
1040~1200:-2
|
||||
1370~1500:-2
|
||||
1672~1750:2
|
||||
1793~1912:-2
|
||||
2100~2270:10
|
||||
2800~2942:3
|
||||
3058~3171:-3
|
||||
3300~3390:35
|
||||
6000~6150:5
|
||||
7708~7793:3
|
||||
7793~7911:-3
|
||||
8610~8707:3
|
||||
8842~8920:3
|
||||
8920~9165:-3
|
||||
9272~9461:3
|
||||
9494~9641:-3
|
||||
9295~9460:3
|
||||
9510~9600:-3
|
||||
11400~11600:3
|
||||
11822~12064:-3
|
||||
12200~12514:3
|
||||
12514~12644:-3
|
||||
13072~13388:3
|
||||
13400~13600:5
|
||||
14000~14100:5
|
||||
14524~14660:5
|
||||
14839~14920:5
|
||||
15600~15650:-3
|
||||
16350~16440:-5
|
||||
16563~16700:-5
|
||||
18250~18310:3
|
||||
243~592:-15,15,0
|
||||
750~908:5,-5,0
|
||||
908~1055:15,-15,0
|
||||
1055~1100:15,-15,0
|
||||
1100~1220:10,0,0
|
||||
1220~1310:10,5,0
|
||||
1330~1695:-5,10,0
|
||||
1899~1925:5,-5,1
|
||||
1925~2340:10,-5,1
|
||||
2524~2790:-5,5,1
|
||||
2960~3120:10,-5,1
|
||||
3120~3300:15,-5,0
|
||||
3300~3555:10,5,0
|
||||
3555~3755:-15,5,0
|
||||
3967~4336:-5,5,0
|
||||
4483~4590:10,-5,0
|
||||
4590~4781:15,-5,0
|
||||
4817~5129:-5,0,0
|
||||
5191~5279:5,0,0
|
||||
5279~5509:10,0,0
|
||||
5630~5900:-10,0,0
|
||||
6578~7641:5,-5,0
|
||||
7838~7919:5,-5,0
|
||||
7919~8050:15,0,0
|
||||
8471~8985:5,0,0
|
||||
9536~9605:-5,0,0
|
||||
9605~9709:-10,0,0
|
||||
10123~10515:5,0,0
|
||||
10500~10700:-5,0,0
|
||||
10807~10834:5,0,0
|
||||
10834~11670:10,-5,0
|
||||
11734~11870:-5,0,0
|
||||
12170~12320:-15,0,0
|
||||
24620
Assets/Scenes/TestPlay.unity
Normal file
24620
Assets/Scenes/TestPlay.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/TestPlay.unity.meta
Normal file
7
Assets/Scenes/TestPlay.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 662c16c65a3f27041aaf8342752b4329
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -65,14 +65,14 @@ namespace Assets.Scripts.Apis
|
||||
/// <param name="sort">hot, distance</param>
|
||||
/// <param name="sortDire">asc</param>
|
||||
/// <returns></returns>
|
||||
public Task<JsonResult<List<MapRoute>>> GetList(int pageIndex, int pageSize, string name, string distance="", string hands="", bool is3D=false, string sort="", string sortDire = "", bool isFav = false,bool isMine = false,bool isRecent = false)
|
||||
public Task<JsonResult<List<MapRoute>>> GetList(int pageIndex, int pageSize, string name, string distance="", string hands="", bool is3D=false, string sort="", string sortDire = "", bool isFav = false,bool isMine = false,bool isRecent = false,bool isEnableAR = false)
|
||||
{
|
||||
string lngLat = "";
|
||||
if (sort.Equals("Near"))
|
||||
{
|
||||
lngLat = $"{App.longitude},{App.latitude}";
|
||||
}
|
||||
var url = $"Map/GetRoute?pageIndex={ pageIndex }&pageSize={ pageSize }&name={ name }&distance={ distance }&hands={ hands }&is3D={ is3D }&sort={ sort }&sortDire={ sortDire }&isFav={isFav}&lngLat={lngLat}&isMine={isMine}&isRecent={isRecent}";
|
||||
var url = $"Map/GetRoute?pageIndex={ pageIndex }&pageSize={ pageSize }&name={ name }&distance={ distance }&hands={ hands }&is3D={ is3D }&sort={ sort }&sortDire={ sortDire }&isFav={isFav}&lngLat={lngLat}&isMine={isMine}&isRecent={isRecent}&isEnableAR={isEnableAR}";
|
||||
|
||||
return GetAsync<JsonResult<List<MapRoute>>>(url);
|
||||
}
|
||||
|
||||
@ -19,10 +19,13 @@ public class MainController : BaseScene
|
||||
{
|
||||
[SerializeField] GameObject root;
|
||||
private Text Version;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
Debug.Log("执行25");
|
||||
|
||||
MapUDPService.MessageListener = ListenerHandler;
|
||||
Version = this.transform.Find("GameObject").Find("Version").GetComponent<Text>();
|
||||
Version.text = "V" + App.AppVersion;
|
||||
DeviceCache.Init(PFConstants.DeviceCacheFolder);
|
||||
@ -64,6 +67,16 @@ public class MainController : BaseScene
|
||||
//DOTween.KillAll();
|
||||
FinishMessage(sender);
|
||||
}
|
||||
private bool DataSorceChanged { get; set; }
|
||||
private void ListenerHandler(List<ReceiveMsgModel> message)
|
||||
{
|
||||
var msg = message.Where(c => c.RoomList != null && c.RoomList.Count > 0).FirstOrDefault();
|
||||
if (msg != null)
|
||||
{
|
||||
App.gameRoomDetail = msg.RoomList.FirstOrDefault();
|
||||
DataSorceChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
List<CanvasGroup> msgs;
|
||||
Vector3 msgLocation;
|
||||
@ -318,7 +331,7 @@ public class MainController : BaseScene
|
||||
}
|
||||
if (App.MainSceneParam["Name"] == "NewRouteDetail" && App.currentArea != null)
|
||||
{
|
||||
UIManager.ShowNewRouteDetailPanel(App.currentArea.Id);
|
||||
UIManager.ShowNewRouteDetailPanel(App.currentArea.Id,App.currentArea.CoverImage);
|
||||
}
|
||||
if (App.MainSceneParam["Name"] == "UserInfoPanel")
|
||||
{
|
||||
@ -364,7 +377,7 @@ public class MainController : BaseScene
|
||||
//UIManager.ShowBigMapPanel();
|
||||
//UIManager.ShowEarthPanel();
|
||||
}
|
||||
|
||||
ShowGameRoomInviteConfirm();
|
||||
UIManager.UpdateJoinCompetition();//查询当前我参加的赛事
|
||||
}
|
||||
|
||||
@ -378,6 +391,12 @@ public class MainController : BaseScene
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (DataSorceChanged)
|
||||
{
|
||||
DataSorceChanged = false;
|
||||
UIManager.ShowGameRoomDetailPanel();
|
||||
return;
|
||||
}
|
||||
clearcachet -= Time.deltaTime;
|
||||
if (clearcachet <= 0)
|
||||
{
|
||||
@ -517,6 +536,30 @@ public class MainController : BaseScene
|
||||
}
|
||||
}
|
||||
}
|
||||
//检查剪切板内容进入对战房间
|
||||
private void ShowGameRoomInviteConfirm()
|
||||
{
|
||||
var clipContent = Utils.GetClipboard();
|
||||
if (!string.IsNullOrEmpty(clipContent) && App.currentPageIsHome)
|
||||
{
|
||||
//GameRoom/{App.CurrentUser.Nickname}/{manager.GameRoom.Name}/{manager.GameRoom.RoomId}
|
||||
var code = EncrypHelper.Decrypt(clipContent);
|
||||
if (string.IsNullOrEmpty(code))
|
||||
return;
|
||||
var arr = code.Split('/');
|
||||
var userName = arr[1];
|
||||
var roomName = arr[2];
|
||||
var roomId = Convert.ToInt32(arr[3]);
|
||||
var content = $"{userName} {App.GetLocalString("invite you to join in")} {roomName} , {App.GetLocalString("are you accept the invitation?")}";
|
||||
UIManager.ShowConfirm(App.GetLocalString("Invitition"), content, () => {
|
||||
UIManager.CloseConfirm();
|
||||
App.Model = "GameRoom";
|
||||
MapUDPService.SendJoinGameRoom(roomId, App.CurrentUser.Id, UIManager.Now.GetDateTime().ToUniversalTime());
|
||||
MapUDPService.SendQueryGameRoomList(App.CurrentUser.Id, 0, 1, arr[3]);
|
||||
});
|
||||
Utils.CopyToClipboard("");
|
||||
}
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventQueueSystem.RemoveListener<LinkedMessageEvent>(LinkedMessageHandler);
|
||||
|
||||
@ -142,6 +142,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
Cadence = item.Cadence,
|
||||
TotalTicks = item.TotalTicks,
|
||||
WeightKg = item.WeightKg,
|
||||
Sex = item.Sex,
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -161,7 +162,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
Headimage = item.HeadImage,
|
||||
CreateTime = DateTime.MaxValue,
|
||||
EndDistance = item.EndDistance,
|
||||
IsCompleted = item.IsCompleted
|
||||
IsCompleted = item.IsCompleted,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -292,6 +293,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
EndDistance = item.EndDistance,
|
||||
PreDistance = item.PreDistance,
|
||||
WeightKg = item.WeightKg,
|
||||
Sex = item.Sex,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,12 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
{
|
||||
public class GameModel : BaseCycling
|
||||
{
|
||||
/// <summary>
|
||||
/// 第一个到终点的时间
|
||||
/// </summary>
|
||||
public DateTime? FirstEndTime { get; private set; }
|
||||
public GameRoomModel GameRoom { get; private set; }
|
||||
|
||||
public GameModel(Route route,RouteResultParam param)
|
||||
: base(route, CyclingModel.Single)
|
||||
{
|
||||
@ -30,6 +36,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
selectParam = param,
|
||||
RoomId = App.gameRoomDetail.RoomId,
|
||||
};
|
||||
GameRoom = App.gameRoomDetail;
|
||||
App.gameRoomDetail = null;
|
||||
if (param != null)
|
||||
{
|
||||
@ -68,6 +75,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
EndDistance = item.EndDistance,
|
||||
PreDistance = item.PreDistance,
|
||||
WeightKg = item.WeightKg,
|
||||
Sex = item.Sex,
|
||||
FrameRate = item.FrameRate,
|
||||
});
|
||||
}
|
||||
@ -75,5 +83,20 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
#endregion
|
||||
base.Run(targetData);
|
||||
}
|
||||
|
||||
protected override void BeforeRunAfterPakcData()
|
||||
{
|
||||
base.BeforeRunAfterPakcData();
|
||||
|
||||
var userList = MapUDPService.GetOnlineUsers(recorderData.CurrentRoute.RouteInstance.Id,recorderData.RoomId).Where(c=>c.IsSelf == false).OrderByDescending(u => u.Saved).ThenBy(d => d.CreateTime).ThenByDescending(d => d.EndDistance);
|
||||
if (userList.Any())
|
||||
{
|
||||
foreach (var item in userList)
|
||||
{
|
||||
if(!FirstEndTime.HasValue && item.IsCompleted)
|
||||
FirstEndTime = Now.AddMinutes(GameRoom.CloseTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,6 +91,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
EndDistance = item.EndDistance,
|
||||
PreDistance = item.PreDistance,
|
||||
WeightKg = item.WeightKg,
|
||||
Sex = item.Sex,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -80,6 +80,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
EndDistance = item.EndDistance,
|
||||
PreDistance = item.PreDistance,
|
||||
WeightKg = item.WeightKg,
|
||||
Sex = item.Sex,
|
||||
FrameRate = item.FrameRate,
|
||||
});
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.RiderModels
|
||||
public class OnlineRiderModel : BaseRider
|
||||
{
|
||||
public override RiderType riderType => RiderType.Online;
|
||||
|
||||
public int Sex { get; set; } = 0;
|
||||
public double PreDistance { get; set; } = 0;
|
||||
public double Speed { get; set; } = 0;
|
||||
public double WeightKg { get; set; } = 0;
|
||||
|
||||
@ -8,6 +8,7 @@ using System;
|
||||
using ChartAndGraph;
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using Assets.Scenes.Ride.Scripts.Model.CyclingModels;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
@ -61,7 +62,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
weight = App.CurrentUser.Weight;
|
||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||
//#if UNITY_EDITOR
|
||||
power = 300;
|
||||
power = 400;
|
||||
//#endif
|
||||
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
||||
}
|
||||
@ -122,8 +123,25 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
mainController.SaveRealTime();
|
||||
}
|
||||
}
|
||||
HandleForGameRoom();
|
||||
}
|
||||
protected override void BeforeRun()
|
||||
|
||||
private bool gameRoomHandled { get; set; }
|
||||
private void HandleForGameRoom()
|
||||
{
|
||||
var model = mainController.cyclingController as GameModel;
|
||||
if (model != null && model.FirstEndTime.HasValue && !gameRoomHandled)
|
||||
{
|
||||
gameRoomHandled = true;
|
||||
var gap = model.FirstEndTime.Value - UIManager.Now.GetDateTime();
|
||||
var seconds = Math.Floor(gap.TotalSeconds);
|
||||
UIManager.ShowGameRoomCountDownPanel((int)seconds, () => {
|
||||
Upload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected override void BeforeRun()
|
||||
{
|
||||
//if (mainController != null)
|
||||
//{
|
||||
@ -157,7 +175,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
nextPosition.x -= 14f;
|
||||
nextPosition.y += 5f;
|
||||
//人物移动 停止条件 到中间且线未加载完
|
||||
if ( GetStart() && chartDataSourceScript.ReachMid(viewIndex) && !chartDataSourceScript.ReachEnd())
|
||||
if ( GetStart() && chartDataSourceScript.ReachMid(CurrentIndex) && !chartDataSourceScript.ReachEnd())
|
||||
{
|
||||
var currentDistance = CurrentDistance;
|
||||
var distance = Distance;
|
||||
|
||||
@ -76,7 +76,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
timer -= Time.deltaTime;
|
||||
|
||||
CreateHeadImage();
|
||||
|
||||
|
||||
while (timer <= 0)
|
||||
{
|
||||
try
|
||||
@ -141,26 +141,35 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
}
|
||||
private bool animated = false;
|
||||
private float offset = 0;
|
||||
private Vector3 rotation = Vector3.zero;
|
||||
protected CustomRange currentRange { get; set; }
|
||||
//控制角色进行向左或向右
|
||||
protected virtual void Turn()
|
||||
{
|
||||
var currentFrame = GetCurrentFrame();
|
||||
var result = manager.mockDirection.Where(c => c.Start < currentFrame && c.End > currentFrame).FirstOrDefault();
|
||||
if (result != null)
|
||||
currentRange = manager.mockDirection.Where(c => c.Start < currentFrame && c.End > currentFrame).FirstOrDefault();
|
||||
if (currentRange != null)
|
||||
{
|
||||
bearing = result.Value;
|
||||
bearing = currentRange.RotationY;
|
||||
rotation.y = currentRange.RotationY;
|
||||
rotation.z = currentRange.RotationZ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rotation.y = 0;
|
||||
rotation.z = 0;
|
||||
bearing = 0;
|
||||
}
|
||||
animator.SetFloat("bearing", bearing);
|
||||
|
||||
var headBack = ticks % 60 == 0 && speed > 0 && bearing == 0;
|
||||
var drink = ticks % 125 == 0 && speed > 0 && bearing == 0;
|
||||
|
||||
animator.SetFloat("bearing", bearing);
|
||||
animator.SetBool("headBack", headBack);
|
||||
animator.SetBool("drinking", drink);
|
||||
|
||||
var waiting = ratio == 0 ? 1 : 1 / ratio;
|
||||
//直角拐弯
|
||||
if (Math.Abs(bearing) > 30)
|
||||
{
|
||||
if (!animated)
|
||||
@ -181,6 +190,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
}
|
||||
else
|
||||
{
|
||||
//直角拐弯回正
|
||||
if (offset != 0)
|
||||
{
|
||||
var cpoffset = offset;
|
||||
@ -193,11 +203,31 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
};
|
||||
offset = 0;
|
||||
}
|
||||
//正常拐弯
|
||||
else
|
||||
{
|
||||
transform.DORotate(new Vector3(0, bearing, -bearing), waiting);
|
||||
transform.DORotate(rotation, 0.6f);
|
||||
}
|
||||
}
|
||||
}
|
||||
Vector3 current;
|
||||
Vector3 forward;
|
||||
//0-90 右转弯 -90-0左转弯
|
||||
protected virtual void TurnAround()
|
||||
{
|
||||
StartCoroutine(MoveTo());
|
||||
}
|
||||
|
||||
protected virtual IEnumerator MoveTo()
|
||||
{
|
||||
float t = 0;
|
||||
while (t < 1)
|
||||
{
|
||||
t += Time.deltaTime;
|
||||
Vector3 v = Vector3.Lerp(current, forward, t);
|
||||
current = v;
|
||||
transform.DORotate(v, 0);
|
||||
yield return new WaitForEndOfFrame();
|
||||
}
|
||||
}
|
||||
//计算人物当前属性
|
||||
@ -269,6 +299,9 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
}
|
||||
if (manager.CurrentPlayer != null && manager.CurrentPlayer.UserId != UserId)
|
||||
return;
|
||||
|
||||
manager.Play(ratio);
|
||||
|
||||
if (ratio > 1)
|
||||
{
|
||||
ratio = Math.Min(ratio, 1.2f);
|
||||
@ -283,8 +316,6 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
{
|
||||
animator.speed = ratio;
|
||||
}
|
||||
manager.Play(ratio);
|
||||
|
||||
}
|
||||
|
||||
protected virtual void ComputeRecord() { }
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
@ -84,7 +81,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
if (manager.CurrentPlayer == null || manager.CurrentPlayer.UserId != UserId)
|
||||
{
|
||||
var result = manager.mockDirection.Where(c => c.Start < currentFrame && c.End > currentFrame).FirstOrDefault();
|
||||
bearing = result?.Value ?? 0;
|
||||
bearing = result?.RotationY ?? 0;
|
||||
animator.SetFloat("bearing", bearing);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,14 +24,34 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
{
|
||||
public class CustomRange
|
||||
{
|
||||
public int Start { get; set; }
|
||||
public int End { get; set; }
|
||||
public int Value { get; set; }
|
||||
public int Start { get; set; }//起始帧
|
||||
public int End { get; set; }//结束帧
|
||||
public int PositionX { get; set; }
|
||||
public int PositionY { get; set; }
|
||||
public int PositionZ { get; set; }
|
||||
public int RotationY { get; set; }
|
||||
public int RotationZ { get; set; }
|
||||
public int ShadowDirection { get; set; }
|
||||
|
||||
public static CustomRange Read(string s)
|
||||
{
|
||||
//243~573:-15,13,12
|
||||
var result = s.Split(':');
|
||||
var range = result[0].Split('~');
|
||||
var v = result[1].Split(',');
|
||||
CustomRange r = new CustomRange()
|
||||
{
|
||||
Start = Convert.ToInt32(range[0]),
|
||||
End = Convert.ToInt32(range[1]),
|
||||
RotationY = Convert.ToInt32(v[0]),
|
||||
RotationZ = Convert.ToInt32(v[1]),
|
||||
PositionX = Convert.ToInt32(v[2]),
|
||||
};
|
||||
return r;
|
||||
}
|
||||
}
|
||||
public class VideoGameManager : DeviceServiceMonoBase
|
||||
{
|
||||
[SerializeField]
|
||||
public VideoPlayer videoPlayer;
|
||||
public AbstractVideoPlayer CurrentPlayer { get; set; }
|
||||
private MapDataModel mapData { get; set; }
|
||||
private MediaPlayer mediaPlayer { get; set; }
|
||||
@ -49,6 +69,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
public List<float> slots = new List<float>();
|
||||
GameObject infoPanel;
|
||||
GameObject OnlinePlayer;
|
||||
GameObject OnlinePlayer_NV;
|
||||
private bool isStop { get; set; }
|
||||
public enum ARMode
|
||||
{
|
||||
@ -69,7 +90,8 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
recordId = Guid.NewGuid().ToString();
|
||||
MockDirection();
|
||||
infoPanel = Resources.Load<GameObject>("UI/Prefab/AR/VideoPlayerHead");
|
||||
OnlinePlayer = Resources.Load<GameObject>("UI/Prefab/OnlineVideoPlayer");
|
||||
OnlinePlayer = Resources.Load<GameObject>("UI/Prefab/AR/OnlineVideoPlayer");
|
||||
OnlinePlayer_NV = Resources.Load<GameObject>("UI/Prefab/AR/OnlineVideoPlayer_NV");
|
||||
StartCoroutine(Init());
|
||||
}
|
||||
void Start()
|
||||
@ -152,7 +174,15 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
if (currentPlayer != null)
|
||||
{
|
||||
var onlineRider = currentPlayer as OnlineRiderModel;
|
||||
var obj = Instantiate(OnlinePlayer, transform);
|
||||
GameObject obj;
|
||||
if (onlineRider.Sex == 1)
|
||||
{
|
||||
obj = Instantiate(OnlinePlayer, transform);
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = Instantiate(OnlinePlayer_NV, transform);
|
||||
}
|
||||
var online = obj.GetComponent<OnlineVideoPlayer>();
|
||||
online.SetPlayer(onlineRider.NickName, onlineRider.EndDistance-onlineRider.PreDistance, onlineRider.EndDistance, onlineRider.Cadence, onlineRider.HeartRate, onlineRider.TotalTicks, onlineRider.UserId, onlineRider.Power, onlineRider.EndDistance,onlineRider.FrameRate.Value);
|
||||
obj.transform.DOMoveX(0, 1);
|
||||
@ -196,7 +226,15 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
var diff = item.EndDistance % mapData.TotalDistance - currentPlayerInfo.EndDistance % mapData.TotalDistance;
|
||||
if (Math.Abs(diff * 1000) <= 50)
|
||||
{
|
||||
var obj = Instantiate(OnlinePlayer, transform);
|
||||
GameObject obj;
|
||||
if (currentPlayerInfo.Sex == 1)
|
||||
{
|
||||
obj = Instantiate(OnlinePlayer, transform);
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = Instantiate(OnlinePlayer_NV, transform);
|
||||
}
|
||||
var online = obj.GetComponent<OnlineVideoPlayer>();
|
||||
online.SetPlayer(onlineRider.NickName, onlineRider.EndDistance - onlineRider.PreDistance, onlineRider.EndDistance, item.Cadence, item.HeartRate, onlineRider.WeightKg, item.UserId, onlineRider.Power, currentPlayerInfo.EndDistance, onlineRider.FrameRate.Value);
|
||||
obj.transform.DOMoveX(slots[currentOnlineCount], 1);
|
||||
@ -212,19 +250,28 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
_aRMode = aRMode;
|
||||
var uimanager = FindObjectOfType<VideoUIManager>();
|
||||
uimanager.SetCurrentMode(aRMode);
|
||||
if (_aRMode == ARMode.INSPECT)
|
||||
if (_aRMode != ARMode.INSPECT)
|
||||
{
|
||||
videoPlayer?.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
videoPlayer?.gameObject.SetActive(true);
|
||||
CurrentPlayer = videoPlayer;
|
||||
InitCurrentPlayer();
|
||||
ContinueAsync();
|
||||
}
|
||||
}
|
||||
//初始化人物模型
|
||||
public void InitCurrentPlayer()
|
||||
{
|
||||
GameObject videoPlayer;
|
||||
if (App.CurrentUser.Sex == 1)
|
||||
{
|
||||
videoPlayer = Instantiate(Resources.Load<GameObject>("UI/Prefab/AR/VidePlayer"),transform);
|
||||
}
|
||||
else
|
||||
{
|
||||
videoPlayer = Instantiate(Resources.Load<GameObject>("UI/Prefab/AR/VidePlayer_NV"), transform);
|
||||
}
|
||||
CurrentPlayer = videoPlayer.GetComponent<VideoPlayer>();
|
||||
}
|
||||
|
||||
Vector3 origin = new Vector3(0, -1, 4);
|
||||
Vector3 origin = new Vector3(0, -1, 3);
|
||||
//切换人物
|
||||
public void ChangePlayer(int userId)
|
||||
{
|
||||
@ -300,18 +347,13 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
private void MockDirection()
|
||||
{
|
||||
var text = Resources.Load<TextAsset>("UI/direction");
|
||||
var arr = text.text.Replace("\r\n", ",").Split(',');
|
||||
var arr = text.text.Replace("\r\n", " ").Split(' ');
|
||||
foreach (var item in arr)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item))
|
||||
continue;
|
||||
var result = item.Split(':');
|
||||
var range = result[0].Split('~');
|
||||
mockDirection.Add(new CustomRange() {
|
||||
Start = Convert.ToInt32(range[0]),
|
||||
End = Convert.ToInt32(range[1]),
|
||||
Value = Convert.ToInt32(result[1]),
|
||||
});
|
||||
var c = CustomRange.Read(item);
|
||||
mockDirection.Add(c);
|
||||
}
|
||||
}
|
||||
//设置骑行模式
|
||||
@ -521,5 +563,10 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
return new Vector2d(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
App.gameRoomDetail = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -234,6 +234,8 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
|
||||
protected void Download(BaseEventData baseEvent)
|
||||
{
|
||||
var path = PFConstants.VideoFolder;
|
||||
var filepath = path + $"/{route.FileName}";
|
||||
StartCoroutine(Utils.DownloadVideo(route.FileName, route.Url
|
||||
, (p, req) =>
|
||||
{
|
||||
@ -249,7 +251,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
else
|
||||
{
|
||||
slider.value = 100;
|
||||
manager.SetMedia(p);
|
||||
manager.SetMedia(filepath);
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Assets.Scenes.Ride.Scripts;
|
||||
using Assets.Scenes.Ride.Scripts.Model;
|
||||
using Assets.Scenes.Ride.Scripts.Model.CyclingModels;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Linq;
|
||||
@ -44,14 +45,26 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
{
|
||||
base.ComputeAnimator();
|
||||
}
|
||||
protected override void Turn()
|
||||
{
|
||||
base.Turn();
|
||||
if (currentRange != null)
|
||||
{
|
||||
transform.DOMoveX(currentRange.PositionX, 0.8f);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.DOMoveX(1, 0.8f);
|
||||
}
|
||||
}
|
||||
protected override void ComputePlayer()
|
||||
{
|
||||
heartRate = manager.UpDateHeart();
|
||||
power = manager.UpdatePower();
|
||||
cadance = manager.UpdateCadence();
|
||||
//#if UNITY_EDITOR
|
||||
power = 350;
|
||||
cadance = 150;
|
||||
power = 100;
|
||||
cadance = 70;
|
||||
heartRate = 160;
|
||||
//#endif
|
||||
weight = App.CurrentUser.Weight;
|
||||
@ -59,10 +72,27 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
wkg = Math.Round(power / weight, 2);
|
||||
var mainFrame = manager.GetCurrentFrame();
|
||||
var result = manager.mockDirection.Where(c => c.Start < mainFrame && c.End > mainFrame).FirstOrDefault();
|
||||
bearing = result?.Value ?? 0;
|
||||
bearing = result?.RotationY ?? 0;
|
||||
//发送阻力
|
||||
manager.TrackResistance(currentSlope);
|
||||
base.ComputePlayer();
|
||||
HandleForGameRoom();
|
||||
}
|
||||
private bool gameRoomHandled { get; set; }
|
||||
private void HandleForGameRoom()
|
||||
{
|
||||
var model = manager.cyclingController as GameModel;
|
||||
if (model != null && model.FirstEndTime.HasValue && !gameRoomHandled)
|
||||
{
|
||||
gameRoomHandled = true;
|
||||
var gap = model.FirstEndTime.Value - UIManager.Now.GetDateTime();
|
||||
var seconds = Math.Floor(gap.TotalSeconds);
|
||||
UIManager.ShowGameRoomCountDownPanel((int)seconds, () => {
|
||||
Upload();
|
||||
var uiManager = FindObjectOfType<VideoUIManager>();
|
||||
uiManager.ShowResultPanel();
|
||||
});
|
||||
}
|
||||
}
|
||||
//控制视频播放速度
|
||||
protected override void ComputeVideo()
|
||||
@ -89,7 +119,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
_TotalClimb = totalClimb,
|
||||
_FrameRate = manager.GetCurrentFrame()
|
||||
};
|
||||
var preDistance = totalDistance >= mapData.TotalDistance ? targetData._Distance : targetData._Distance - distance;
|
||||
var preDistance = targetData._Distance - distance;//totalDistance >= mapData.TotalDistance ? targetData._Distance : targetData._Distance - distance;
|
||||
recorderData.PreDistance = Math.Round(preDistance, 6, MidpointRounding.AwayFromZero);
|
||||
recorderData.EndDistance = Math.Round(targetData._Distance, 6, MidpointRounding.AwayFromZero);
|
||||
recorderData.RiderDatas.Add(targetData);
|
||||
|
||||
@ -216,6 +216,15 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
cameraImage.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowResultPanel()
|
||||
{
|
||||
resultPanel.SetActive(true);
|
||||
resultPanel.transform.SetAsLastSibling();
|
||||
var videoResultScript = resultPanel.GetComponent<VideoResultScript>();
|
||||
videoResultScript.InjectController(manager);
|
||||
videoResultScript.SetDataSource(manager.cyclingController.recorderData);
|
||||
}
|
||||
private void QuitClick(BaseEventData e)
|
||||
{
|
||||
if (manager._aRMode == VideoGameManager.ARMode.RIDE)
|
||||
|
||||
@ -58,6 +58,7 @@ class GameRoomDownloadTask : MonoBehaviour
|
||||
{
|
||||
slider.gameObject.SetActive(false);
|
||||
gameObject.Destroy();
|
||||
Loom.DownLoadTaskList.Remove(FileName);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,24 +29,34 @@ class GameRoomPlayerPanel : MonoBehaviour
|
||||
|
||||
public bool NotUse { get; private set; }
|
||||
|
||||
public bool IsOwner { get; private set; }
|
||||
|
||||
private void Start()
|
||||
{
|
||||
var manager = FindObjectOfType<GameRoomDetailController>();
|
||||
var inviteBtn = inviteModal.transform.Find("InviteBtn").gameObject;
|
||||
UIManager.AddEvent(inviteBtn,EventTriggerType.PointerClick,(e)=> {
|
||||
Utils.CopyToClipboard($"GameRoom/{manager.GameRoom.RoomId}");
|
||||
var encryptCode = EncrypHelper.Encrypt($"GameRoom/{App.CurrentUser.Nickname}/{manager.GameRoom.Name}/{manager.GameRoom.RoomId}");
|
||||
Utils.CopyToClipboard(encryptCode);
|
||||
Utils.showToast(transform.parent.gameObject, App.GetLocalString("copy to clipboard successfully!"));
|
||||
});
|
||||
|
||||
UIManager.AddEvent(gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
if (App.gameRoomDetail.UserId != App.CurrentUser.Id)
|
||||
return;
|
||||
kickModal.SetActive(true);
|
||||
});
|
||||
UIManager.AddEvent(cancelBtn, EventTriggerType.PointerExit, (e) =>
|
||||
UIManager.AddEvent(cancelBtn, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
if (App.gameRoomDetail.UserId != App.CurrentUser.Id)
|
||||
return;
|
||||
kickModal.SetActive(false);
|
||||
});
|
||||
UIManager.AddEvent(kickBtn, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
if (App.gameRoomDetail.UserId != App.CurrentUser.Id)
|
||||
return;
|
||||
MapUDPService.SendGameRoomKick(App.gameRoomDetail.RoomId, UserId, App.CurrentUser.Id);
|
||||
});
|
||||
}
|
||||
@ -63,7 +73,7 @@ class GameRoomPlayerPanel : MonoBehaviour
|
||||
ftpTxt.text = ftp.ToString();
|
||||
me.SetActive(App.CurrentUser.Id == userId);
|
||||
owner.SetActive(isOwner);
|
||||
//Show ready
|
||||
IsOwner = isOwner;
|
||||
ready.SetActive(!isOwner && Status == 1);
|
||||
}
|
||||
|
||||
@ -77,14 +87,10 @@ class GameRoomPlayerPanel : MonoBehaviour
|
||||
ftpTxt.text = ftp.ToString();
|
||||
me.SetActive(App.CurrentUser.Id == userId);
|
||||
owner.SetActive(isOwner);
|
||||
IsOwner = isOwner;
|
||||
ready.SetActive(!isOwner && Status == 1);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Ready()
|
||||
{
|
||||
ready.SetActive(true);
|
||||
|
||||
@ -27,9 +27,10 @@ public class NewRouteItemController : MonoBehaviour
|
||||
GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.ShowNewRouteDetailPanel(area.Id);
|
||||
UIManager.ShowNewRouteDetailPanel(area.Id,area.CoverImage);
|
||||
});
|
||||
StartCoroutine(displayImage(area, caches));
|
||||
Utils.DisplayImage(GetComponent<RawImage>(), area.CoverImage);
|
||||
//StartCoroutine(displayImage(area, caches));
|
||||
}
|
||||
|
||||
IEnumerator displayImage(MapRouteAreaItem area, Dictionary<string, Texture> caches = null)
|
||||
|
||||
@ -42,7 +42,10 @@ public class GameRoomCountDownController : PFUIPanel
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
count.text = Seconds.ToString();
|
||||
else
|
||||
{
|
||||
count.text = Seconds.ToString();
|
||||
}
|
||||
Seconds--;
|
||||
timer += 1f;
|
||||
}
|
||||
|
||||
@ -103,7 +103,10 @@ public class GameRoomDetailController : PFUIPanel
|
||||
if (detail.RoomList != null)
|
||||
{
|
||||
GameRoom = detail.RoomList.Where(c => c.RoomId == GameRoom.RoomId).FirstOrDefault();
|
||||
DataSourceChanged = true;
|
||||
if (GameRoom != null)
|
||||
{
|
||||
DataSourceChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -134,11 +137,11 @@ public class GameRoomDetailController : PFUIPanel
|
||||
d3.SetActive(enable3d);
|
||||
ar.SetActive(GameRoom.EnableAR);
|
||||
|
||||
//DataSourceChanged = true;
|
||||
MapUDPService.SendQueryGameRoomList(App.CurrentUser.Id, 0, 1, GameRoom.RoomId.ToString());
|
||||
readyBtn.SetActive(true);
|
||||
cancelBtn.SetActive(false);
|
||||
startBtn.SetActive(false);
|
||||
var isOwner = GameRoom.UserId == App.CurrentUser.Id;
|
||||
readyBtn.SetActive(!isOwner);
|
||||
cancelBtn.SetActive(!isOwner);
|
||||
startBtn.SetActive(isOwner);
|
||||
|
||||
idText.text = GameRoom.RoomId.ToString().PadLeft(7, '0');
|
||||
roomName.text = GameRoom.Name;
|
||||
@ -170,21 +173,21 @@ public class GameRoomDetailController : PFUIPanel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isOwner { get; set; } = true;
|
||||
private void TcpHandler()
|
||||
{
|
||||
if (DataSourceChanged)
|
||||
{
|
||||
var playerList = FindObjectsOfType<GameRoomPlayerPanel>();
|
||||
var list = GameRoom.RoomPlayerList;
|
||||
//自己
|
||||
//自己是否是房主
|
||||
var mine = list.Where(c => c.UserId == App.CurrentUser.Id).FirstOrDefault();
|
||||
if (mine != null)
|
||||
if (mine != null && isOwner != mine.IsOwner)
|
||||
{
|
||||
//是否是房主
|
||||
var owner = mine.IsOwner;
|
||||
readyBtn.SetActive(!owner);
|
||||
startBtn.SetActive(owner);
|
||||
isOwner = mine.IsOwner;
|
||||
readyBtn.SetActive(!isOwner);
|
||||
startBtn.SetActive(isOwner);
|
||||
cancelBtn.SetActive(!isOwner);
|
||||
}
|
||||
//新增/更新
|
||||
foreach (var item in list)
|
||||
|
||||
@ -30,7 +30,7 @@ public class GameRoomListController : PFUIPanel
|
||||
private Transform searchInput;
|
||||
|
||||
private string sort = "", sortDire = "";
|
||||
private bool isFav;
|
||||
private bool isEnableAR { get; set; }
|
||||
private int pageSize = 10;
|
||||
private string ftname = "";
|
||||
private string distance = "";
|
||||
@ -276,6 +276,7 @@ public class GameRoomListController : PFUIPanel
|
||||
UIManager.ShowGameRoomDetailPanel();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitStep1()
|
||||
{
|
||||
sort = "Near";
|
||||
@ -286,6 +287,7 @@ public class GameRoomListController : PFUIPanel
|
||||
scroll = transform.Find("MapList/Modal/Right/Scroll View").gameObject;
|
||||
if (scroll != null)
|
||||
{
|
||||
UIManager.RemoveEvent(scroll, UnityEngine.EventSystems.EventTriggerType.EndDrag);
|
||||
UIManager.AddEvent(scroll, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
|
||||
}
|
||||
|
||||
@ -296,6 +298,7 @@ public class GameRoomListController : PFUIPanel
|
||||
distanceOptions.GetComponent<Dropdown>().value = 0;
|
||||
var dDropdown = distanceOptions.GetComponent<Dropdown>();
|
||||
dDropdown.options = MapFilterOptions.distances;
|
||||
dDropdown.onValueChanged.RemoveAllListeners();
|
||||
dDropdown.onValueChanged.AddListener(ChangeDistance);
|
||||
}
|
||||
|
||||
@ -307,6 +310,7 @@ public class GameRoomListController : PFUIPanel
|
||||
var g = tdContainer.Find("Gou").gameObject;
|
||||
g.SetActive(false);
|
||||
is3d = false;
|
||||
UIManager.RemoveEvent(tdContainer.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(tdContainer.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
var gou = tdContainer.Find("Gou").gameObject;
|
||||
@ -321,13 +325,13 @@ public class GameRoomListController : PFUIPanel
|
||||
{
|
||||
var g = favContainer.Find("Gou").gameObject;
|
||||
g.SetActive(false);
|
||||
isFav = false;
|
||||
UIManager.AddEvent(favContainer.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
var gou = favContainer.Find("Gou").gameObject;
|
||||
isEnableAR = false;
|
||||
UIManager.RemoveEvent(favContainer.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(favContainer.gameObject, EventTriggerType.PointerClick, (e)=> {
|
||||
var gou = e.selectedObject.transform.Find("Gou").gameObject;
|
||||
bool v = !gou.activeSelf;
|
||||
gou.SetActive(v);
|
||||
isFav = v;
|
||||
isEnableAR = v;
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
@ -337,12 +341,13 @@ public class GameRoomListController : PFUIPanel
|
||||
{
|
||||
searchInput.GetComponent<InputField>().text = "";
|
||||
ftname = "";
|
||||
searchInput.GetComponent<InputField>().onEndEdit.RemoveAllListeners();
|
||||
searchInput.GetComponent<InputField>().onEndEdit.AddListener((s) =>
|
||||
{
|
||||
var t = searchInput.GetComponent<InputField>().text;
|
||||
ftname = t;
|
||||
});
|
||||
|
||||
UIManager.RemoveEvent(searchInput.Find("Button").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
onEndEdit();
|
||||
@ -362,6 +367,7 @@ public class GameRoomListController : PFUIPanel
|
||||
ColorUtility.TryParseHtmlString("#23232D", out Color cc);
|
||||
image.color = cc;
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
UIManager.RemoveEvent(button.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(button.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
ColorUtility.TryParseHtmlString("#23232D", out Color c1);
|
||||
@ -391,6 +397,7 @@ public class GameRoomListController : PFUIPanel
|
||||
var drop = sorts.GetComponent<Dropdown>();
|
||||
drop.options = MapFilterOptions.sorts;
|
||||
drop.value = 0;
|
||||
drop.onValueChanged.RemoveAllListeners();
|
||||
drop.onValueChanged.AddListener((int index) =>
|
||||
{
|
||||
var text = drop.options[index].text;
|
||||
@ -420,6 +427,7 @@ public class GameRoomListController : PFUIPanel
|
||||
if (sortDir)
|
||||
{
|
||||
var image = sortDir.Find("Image").GetComponent<Image>();
|
||||
UIManager.RemoveEvent(sortDir.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(sortDir.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
if (image.sprite.name == "DOWN")
|
||||
@ -454,22 +462,22 @@ public class GameRoomListController : PFUIPanel
|
||||
|
||||
right = transform.Find("MapList/Modal/Right").gameObject;
|
||||
right2 = transform.Find("MapList/Modal/Right2").gameObject;
|
||||
|
||||
UIManager.RemoveEvent(cancel, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(cancel, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
MapList.SetActive(false);
|
||||
});
|
||||
|
||||
UIManager.RemoveEvent(next, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(next, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
HandleStepBtn(next.name);
|
||||
});
|
||||
|
||||
UIManager.RemoveEvent(previous, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(previous, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
HandleStepBtn(previous.name);
|
||||
});
|
||||
|
||||
UIManager.RemoveEvent(create, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(create, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
MapUDPService.SendCreateGameRoom(RoomName, selectedRouteId, Roompwd, UIManager.Now.GetDateTime(), CloseTime, Members, Map.AverageGrade, (Map.TotalClimb ?? 0), Map.Distance, Map.Enable3D, Map.EnableAR, Map.Name, Map.FileName, Map.Url, Map.AltitudeGraph);
|
||||
@ -506,12 +514,14 @@ public class GameRoomListController : PFUIPanel
|
||||
HandleFormInput();
|
||||
HandleCloseTimeBtnClick(0, "");
|
||||
HandleMembersBtnClick(0, "");
|
||||
roomNameInputField.onValueChanged.RemoveAllListeners();
|
||||
//房间名
|
||||
roomNameInputField.onValueChanged.AddListener((e) => {
|
||||
RoomName = e;
|
||||
HandleFormInput();
|
||||
});
|
||||
//房间密码
|
||||
passwordInputField.onValueChanged.RemoveAllListeners();
|
||||
passwordInputField.onValueChanged.AddListener((e) => {
|
||||
Roompwd = e;
|
||||
HandleFormInput();
|
||||
@ -537,12 +547,14 @@ public class GameRoomListController : PFUIPanel
|
||||
HandleCloseTimeBtnClick(60, btn60.name);
|
||||
});
|
||||
//小时
|
||||
hourInputField.onValueChanged.RemoveAllListeners();
|
||||
hourInputField.onValueChanged.AddListener((e) => {
|
||||
hours = Convert.ToInt32(e);
|
||||
CloseTime = hours * 60 + mins;
|
||||
HandleCloseTimeBtnClick(CloseTime, hourInputField.name);
|
||||
});
|
||||
//分钟
|
||||
minInputField.onValueChanged.RemoveAllListeners();
|
||||
minInputField.onValueChanged.AddListener((e) => {
|
||||
mins = Convert.ToInt32(e);
|
||||
CloseTime = hours * 60 + mins;
|
||||
@ -829,7 +841,7 @@ public class GameRoomListController : PFUIPanel
|
||||
private async void GetList()
|
||||
{
|
||||
if (isEnd) return;
|
||||
var res = await ConfigHelper.mapApi.GetList(pageIndex, pageSize, ftname, distance, string.Join(",", hands), is3d, sort, sortDire);
|
||||
var res = await ConfigHelper.mapApi.GetList(pageIndex, pageSize, ftname, distance, string.Join(",", hands), is3d, sort, sortDire, isEnableAR:isEnableAR);
|
||||
if (res.result)
|
||||
{
|
||||
if (res.data.Count == 0)
|
||||
|
||||
@ -131,10 +131,12 @@ public class HomeController : PFUIPanel
|
||||
private void GoGameRoom(BaseEventData e)
|
||||
{
|
||||
#if UNITY_STANDALONE_WIN
|
||||
OnExit(e);
|
||||
var pe = (PointerEventData)e;
|
||||
if (pe == null)
|
||||
return;
|
||||
var parent = pe.pointerEnter.transform.parent;
|
||||
UIManager.ShowGameRoomListPanel();
|
||||
OnExit(e);
|
||||
#endif
|
||||
}
|
||||
private void GoRide(BaseEventData e)
|
||||
|
||||
@ -134,12 +134,12 @@ public class NewRouteDetailController : PFUIPanel
|
||||
MapRouteAreaDetail area;
|
||||
int pageIndex = 0, pageSize = 12;
|
||||
bool isEnd = false, startMouse = false;
|
||||
public async void Initial(int areaId)
|
||||
public async void Initial(int areaId,string coverImage)
|
||||
{
|
||||
isEnd = false;
|
||||
pageIndex = 0;
|
||||
var left = transform.Find("Container/Left");
|
||||
left.Find("Icon").GetComponent<RawImage>().texture = null;
|
||||
Utils.DisplayImageTempDict(transform.Find("Container/Left/Icon").GetComponent<RawImage>(), coverImage, caches , b =>{ });
|
||||
scroll.content.DestroyChildren();
|
||||
transform.Find("Container/Left/RideContainer/Text").GetComponent<Text>()
|
||||
.text = string.Empty;
|
||||
@ -151,8 +151,6 @@ public class NewRouteDetailController : PFUIPanel
|
||||
.text = string.Empty;
|
||||
transform.Find("Container/Left/DescScroll/Viewport/Content/Desc").GetComponent<Text>()
|
||||
.text = string.Empty;
|
||||
|
||||
|
||||
await GetData(areaId);
|
||||
GetList();
|
||||
|
||||
|
||||
@ -170,6 +170,8 @@ public class NewRouteOverviewController: PFUIPanel
|
||||
}
|
||||
group.SetParent(collectionContent);
|
||||
group.localScale = Vector3.one;
|
||||
//获取数据后需要重绘
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(collectionContent);
|
||||
}
|
||||
//for (int i = 0; i < 10; i++)
|
||||
//{
|
||||
@ -182,8 +184,7 @@ public class NewRouteOverviewController: PFUIPanel
|
||||
// group.SetParent(collectionContent);
|
||||
// group.localScale = Vector3.one;
|
||||
//}
|
||||
//获取数据后需要重绘
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(collectionContent);
|
||||
|
||||
}
|
||||
void MoveBanner(bool right)
|
||||
{
|
||||
|
||||
@ -101,6 +101,7 @@ public class UserInfoController : PFUIPanel
|
||||
// var result = await userApi.Login("15651831367", "123456", "");
|
||||
// App.CurrentUser = result.data;
|
||||
//}
|
||||
Utils.DisplayHead(infoPanel.Find("Avatar").GetComponent<RawImage>(), App.CurrentUser.WxHeadImg);
|
||||
var r = await ConfigHelper.userApi.GetSummary();
|
||||
if (r.result)
|
||||
{
|
||||
|
||||
@ -250,7 +250,7 @@ public class ResultListController : PFUIPanel
|
||||
obj.GetComponent<RouteItem>().Initial(item.ToObject<RowerResultModel>(), index, transform,true);
|
||||
}
|
||||
//obj.SendMessage("Initial", );
|
||||
obj.transform.parent = content;
|
||||
obj.transform.SetParent(content);
|
||||
obj.transform.localScale = new Vector3(1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -401,10 +401,10 @@ public class UIManager : MonoBehaviour
|
||||
return this.GetPanelInstance("NewRouteDetailPanel", ref this.mNewRouteDetailController);
|
||||
}
|
||||
}
|
||||
public static void ShowNewRouteDetailPanel(int areaId)
|
||||
public static void ShowNewRouteDetailPanel(int areaId,string coverImage)
|
||||
{
|
||||
UIManager.Show(UIManager.Instance.NewRouteDetailPanel, UIManager.Instance.MainPanel);
|
||||
UIManager.Instance.NewRouteDetailPanel.GetComponent<NewRouteDetailController>().Initial(areaId);
|
||||
UIManager.Instance.NewRouteDetailPanel.GetComponent<NewRouteDetailController>().Initial(areaId, coverImage);
|
||||
}
|
||||
#endregion
|
||||
private CountDownAnimation mCountDownAnimation;
|
||||
@ -872,11 +872,15 @@ public class UIManager : MonoBehaviour
|
||||
public static void ShowGameRoomListPanel()
|
||||
{
|
||||
App.Model = "GameRoom";
|
||||
UIManager.Instance.MainPanel.GetComponent<Image>().sprite =
|
||||
Resources.Load<Sprite>("Images/GameRoom/RACE-BG");
|
||||
UIManager.Show(UIManager.Instance.GameRoomListPanel, UIManager.Instance.MainPanel);
|
||||
}
|
||||
public static void ShowGameRoomDetailPanel()
|
||||
{
|
||||
App.Model = "GameRoom";
|
||||
UIManager.Instance.MainPanel.GetComponent<Image>().sprite =
|
||||
Resources.Load<Sprite>("Images/GameRoom/RACE-BG");
|
||||
UIManager.Show(UIManager.Instance.GameRoomDetailPanel, UIManager.Instance.MainPanel);
|
||||
}
|
||||
//显示房间loading页面
|
||||
@ -1086,6 +1090,13 @@ public class UIManager : MonoBehaviour
|
||||
if (et == null) return;
|
||||
et.triggers.RemoveAll(x => true);
|
||||
}
|
||||
|
||||
public static void RemoveEvent(GameObject gameObject, EventTriggerType eventTriggerType)
|
||||
{
|
||||
EventTrigger et = gameObject.GetComponent<EventTrigger>();
|
||||
if (et == null) return;
|
||||
et.triggers.RemoveAll(x => x.eventID == eventTriggerType);
|
||||
}
|
||||
public static void AddEvent(GameObject gameObject, EventTriggerType eventTriggerType, UnityAction<BaseEventData> call)
|
||||
{
|
||||
EventTrigger et = gameObject.GetComponent<EventTrigger>();
|
||||
|
||||
601
Assets/Scripts/Utils/Davinci.cs
Normal file
601
Assets/Scripts/Utils/Davinci.cs
Normal file
@ -0,0 +1,601 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Davinci - A powerful, esay-to-use image downloading and caching library for Unity in Run-Time
|
||||
/// v 1.2
|
||||
/// Developed by ShamsDEV.com
|
||||
/// copyright (c) ShamsDEV.com All Rights Reserved.
|
||||
/// Licensed under the MIT License.
|
||||
/// https://github.com/shamsdev/davinci
|
||||
/// </summary>
|
||||
public class Davinci : MonoBehaviour
|
||||
{
|
||||
private static bool ENABLE_GLOBAL_LOGS = true;
|
||||
|
||||
private bool enableLog = false;
|
||||
private float fadeTime = 1;
|
||||
private bool cached = true;
|
||||
|
||||
private enum RendererType
|
||||
{
|
||||
none,
|
||||
uiImage,
|
||||
renderer
|
||||
}
|
||||
|
||||
private RendererType rendererType = RendererType.none;
|
||||
private GameObject targetObj;
|
||||
private string url = null;
|
||||
|
||||
private Texture2D loadingPlaceholder, errorPlaceholder;
|
||||
|
||||
private UnityAction onStartAction,
|
||||
onDownloadedAction,
|
||||
OnLoadedAction,
|
||||
onEndAction;
|
||||
|
||||
private UnityAction<int> onDownloadProgressChange;
|
||||
private UnityAction<string> onErrorAction;
|
||||
|
||||
private static Dictionary<string, Davinci> underProcessDavincies
|
||||
= new Dictionary<string, Davinci>();
|
||||
|
||||
private string uniqueHash;
|
||||
private int progress;
|
||||
|
||||
private bool success = false;
|
||||
|
||||
static string filePath = Application.persistentDataPath + "/" +
|
||||
"davinci" + "/";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get instance of davinci class
|
||||
/// </summary>
|
||||
public static Davinci get()
|
||||
{
|
||||
return new GameObject("Davinci").AddComponent<Davinci>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set image url for download.
|
||||
/// </summary>
|
||||
/// <param name="url">Image Url</param>
|
||||
/// <returns></returns>
|
||||
public Davinci load(string url)
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Url set : " + url);
|
||||
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set fading animation time.
|
||||
/// </summary>
|
||||
/// <param name="fadeTime">Fade animation time. Set 0 for disable fading.</param>
|
||||
/// <returns></returns>
|
||||
public Davinci setFadeTime(float fadeTime)
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Fading time set : " + fadeTime);
|
||||
|
||||
this.fadeTime = fadeTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set target Image component.
|
||||
/// </summary>
|
||||
/// <param name="image">target Unity UI image component</param>
|
||||
/// <returns></returns>
|
||||
public Davinci into(MaskableGraphic image)
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Target as UIImage set : " + image);
|
||||
|
||||
rendererType = RendererType.uiImage;
|
||||
this.targetObj = image.gameObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set target Renderer component.
|
||||
/// </summary>
|
||||
/// <param name="renderer">target renderer component</param>
|
||||
/// <returns></returns>
|
||||
public Davinci into(Renderer renderer)
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Target as Renderer set : " + renderer);
|
||||
|
||||
rendererType = RendererType.renderer;
|
||||
this.targetObj = renderer.gameObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
#region Actions
|
||||
public Davinci withStartAction(UnityAction action)
|
||||
{
|
||||
this.onStartAction = action;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] On start action set : " + action);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Davinci withDownloadedAction(UnityAction action)
|
||||
{
|
||||
this.onDownloadedAction = action;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] On downloaded action set : " + action);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Davinci withDownloadProgressChangedAction(UnityAction<int> action)
|
||||
{
|
||||
this.onDownloadProgressChange = action;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] On download progress changed action set : " + action);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Davinci withLoadedAction(UnityAction action)
|
||||
{
|
||||
this.OnLoadedAction = action;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] On loaded action set : " + action);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Davinci withErrorAction(UnityAction<string> action)
|
||||
{
|
||||
this.onErrorAction = action;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] On error action set : " + action);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Davinci withEndAction(UnityAction action)
|
||||
{
|
||||
this.onEndAction = action;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] On end action set : " + action);
|
||||
|
||||
return this;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Show or hide logs in console.
|
||||
/// </summary>
|
||||
/// <param name="enable">'true' for show logs in console.</param>
|
||||
/// <returns></returns>
|
||||
public Davinci setEnableLog(bool enableLog)
|
||||
{
|
||||
this.enableLog = enableLog;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Logging enabled : " + enableLog);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the sprite of image when davinci is downloading and loading image
|
||||
/// </summary>
|
||||
/// <param name="loadingPlaceholder">loading texture</param>
|
||||
/// <returns></returns>
|
||||
public Davinci setLoadingPlaceholder(Texture2D loadingPlaceholder)
|
||||
{
|
||||
this.loadingPlaceholder = loadingPlaceholder;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Loading placeholder has been set.");
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set image sprite when some error occurred during downloading or loading image
|
||||
/// </summary>
|
||||
/// <param name="errorPlaceholder">error texture</param>
|
||||
/// <returns></returns>
|
||||
public Davinci setErrorPlaceholder(Texture2D errorPlaceholder)
|
||||
{
|
||||
this.errorPlaceholder = errorPlaceholder;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Error placeholder has been set.");
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable cache
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Davinci setCached(bool cached)
|
||||
{
|
||||
this.cached = cached;
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Cache enabled : " + cached);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start davinci process.
|
||||
/// </summary>
|
||||
public void start()
|
||||
{
|
||||
if (url == null)
|
||||
{
|
||||
error("Url has not been set. Use 'load' funtion to set image url.");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Uri uri = new Uri(url);
|
||||
this.url = uri.AbsoluteUri;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
error("Url is not correct.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (rendererType == RendererType.none || targetObj == null)
|
||||
{
|
||||
error("Target has not been set. Use 'into' function to set target component.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Start Working.");
|
||||
|
||||
if (loadingPlaceholder != null)
|
||||
SetLoadingImage();
|
||||
|
||||
if (onStartAction != null)
|
||||
onStartAction.Invoke();
|
||||
|
||||
if (!Directory.Exists(filePath))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
|
||||
uniqueHash = CreateMD5(url);
|
||||
|
||||
if (underProcessDavincies.ContainsKey(uniqueHash))
|
||||
{
|
||||
Davinci sameProcess = underProcessDavincies[uniqueHash];
|
||||
sameProcess.onDownloadedAction += () =>
|
||||
{
|
||||
if (onDownloadedAction != null)
|
||||
onDownloadedAction.Invoke();
|
||||
|
||||
loadSpriteToImage();
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(filePath + uniqueHash))
|
||||
{
|
||||
if (onDownloadedAction != null)
|
||||
onDownloadedAction.Invoke();
|
||||
|
||||
loadSpriteToImage();
|
||||
}
|
||||
else
|
||||
{
|
||||
underProcessDavincies.Add(uniqueHash, this);
|
||||
StopAllCoroutines();
|
||||
StartCoroutine("Downloader");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator Downloader()
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Download started.");
|
||||
|
||||
var www = new WWW(url);
|
||||
|
||||
while (!www.isDone)
|
||||
{
|
||||
if (www.error != null)
|
||||
{
|
||||
error("Error while downloading the image : " + www.error);
|
||||
yield break;
|
||||
}
|
||||
|
||||
progress = Mathf.FloorToInt(www.progress * 100);
|
||||
if (onDownloadProgressChange != null)
|
||||
onDownloadProgressChange.Invoke(progress);
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Downloading progress : " + progress + "%");
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
if (www.error == null)
|
||||
File.WriteAllBytes(filePath + uniqueHash, www.bytes);
|
||||
|
||||
www.Dispose();
|
||||
www = null;
|
||||
|
||||
if (onDownloadedAction != null)
|
||||
onDownloadedAction.Invoke();
|
||||
|
||||
loadSpriteToImage();
|
||||
|
||||
underProcessDavincies.Remove(uniqueHash);
|
||||
}
|
||||
|
||||
private void loadSpriteToImage()
|
||||
{
|
||||
progress = 100;
|
||||
if (onDownloadProgressChange != null)
|
||||
onDownloadProgressChange.Invoke(progress);
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Downloading progress : " + progress + "%");
|
||||
|
||||
if (!File.Exists(filePath + uniqueHash))
|
||||
{
|
||||
error("Loading image file has been failed.");
|
||||
return;
|
||||
}
|
||||
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(ImageLoader());
|
||||
}
|
||||
|
||||
private void SetLoadingImage()
|
||||
{
|
||||
switch (rendererType)
|
||||
{
|
||||
case RendererType.renderer:
|
||||
Renderer renderer = targetObj.GetComponent<Renderer>();
|
||||
renderer.material.mainTexture = loadingPlaceholder;
|
||||
break;
|
||||
|
||||
case RendererType.uiImage:
|
||||
Image image = targetObj.GetComponent<Image>();
|
||||
Sprite sprite = Sprite.Create(loadingPlaceholder,
|
||||
new Rect(0, 0, loadingPlaceholder.width, loadingPlaceholder.height),
|
||||
new Vector2(0.5f, 0.5f));
|
||||
image.sprite = sprite;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private IEnumerator ImageLoader(Texture2D texture = null)
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Start loading image.");
|
||||
|
||||
if (texture == null)
|
||||
{
|
||||
byte[] fileData;
|
||||
fileData = File.ReadAllBytes(filePath + uniqueHash);
|
||||
texture = new Texture2D(2, 2);
|
||||
//ImageConversion.LoadImage(texture, fileData);
|
||||
texture.LoadImage(fileData); //..this will auto-resize the texture dimensions.
|
||||
}
|
||||
|
||||
Color color;
|
||||
|
||||
if (targetObj != null)
|
||||
switch (rendererType)
|
||||
{
|
||||
case RendererType.renderer:
|
||||
Renderer renderer = targetObj.GetComponent<Renderer>();
|
||||
|
||||
if (renderer == null || renderer.material == null)
|
||||
break;
|
||||
|
||||
renderer.material.mainTexture = texture;
|
||||
float maxAlpha;
|
||||
|
||||
if (fadeTime > 0 && renderer.material.HasProperty("_Color"))
|
||||
{
|
||||
color = renderer.material.color;
|
||||
maxAlpha = color.a;
|
||||
|
||||
color.a = 0;
|
||||
|
||||
renderer.material.color = color;
|
||||
float time = Time.time;
|
||||
while (color.a < maxAlpha)
|
||||
{
|
||||
color.a = Mathf.Lerp(0, maxAlpha, (Time.time - time) / fadeTime);
|
||||
|
||||
if (renderer != null)
|
||||
renderer.material.color = color;
|
||||
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RendererType.uiImage:
|
||||
|
||||
MaskableGraphic image = null;
|
||||
if (targetObj.GetComponent<RawImage>())
|
||||
{
|
||||
image = targetObj.GetComponent<RawImage>();
|
||||
targetObj.GetComponent<RawImage>().texture = texture;
|
||||
}
|
||||
else if (targetObj.GetComponent<Image>())
|
||||
{
|
||||
image = targetObj.GetComponent<Image>();
|
||||
Sprite sprite = Sprite.Create(texture,
|
||||
new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
|
||||
targetObj.GetComponent<Image>().sprite = sprite;
|
||||
}
|
||||
|
||||
if (image == null)
|
||||
break;
|
||||
|
||||
color = image.color;
|
||||
maxAlpha = color.a;
|
||||
|
||||
if (fadeTime > 0)
|
||||
{
|
||||
color.a = 0;
|
||||
image.color = color;
|
||||
|
||||
float time = Time.time;
|
||||
while (color.a < maxAlpha)
|
||||
{
|
||||
color.a = Mathf.Lerp(0, maxAlpha, (Time.time - time) / fadeTime);
|
||||
|
||||
if (image != null)
|
||||
image.color = color;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (OnLoadedAction != null)
|
||||
OnLoadedAction.Invoke();
|
||||
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Image has been loaded.");
|
||||
|
||||
success = true;
|
||||
finish();
|
||||
}
|
||||
|
||||
public static string CreateMD5(string input)
|
||||
{
|
||||
// Use input string to calculate MD5 hash
|
||||
using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create())
|
||||
{
|
||||
byte[] inputBytes = Encoding.ASCII.GetBytes(input);
|
||||
byte[] hashBytes = md5.ComputeHash(inputBytes);
|
||||
|
||||
// Convert the byte array to hexadecimal string
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < hashBytes.Length; i++)
|
||||
{
|
||||
sb.Append(hashBytes[i].ToString("X2"));
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void error(string message)
|
||||
{
|
||||
success = false;
|
||||
|
||||
if (enableLog)
|
||||
Debug.LogError("[Davinci] Error : " + message);
|
||||
|
||||
if (onErrorAction != null)
|
||||
onErrorAction.Invoke(message);
|
||||
|
||||
if (errorPlaceholder != null)
|
||||
StartCoroutine(ImageLoader(errorPlaceholder));
|
||||
else finish();
|
||||
}
|
||||
|
||||
private void finish()
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.Log("[Davinci] Operation has been finished.");
|
||||
|
||||
if (!cached)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(filePath + uniqueHash);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (enableLog)
|
||||
Debug.LogError($"[Davinci] Error while removing cached file: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
if (onEndAction != null)
|
||||
onEndAction.Invoke();
|
||||
|
||||
Invoke("destroyer", 0.5f);
|
||||
}
|
||||
|
||||
private void destroyer()
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clear a certain cached file with its url
|
||||
/// </summary>
|
||||
/// <param name="url">Cached file url.</param>
|
||||
/// <returns></returns>
|
||||
public static void ClearCache(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(filePath + CreateMD5(url));
|
||||
|
||||
if (ENABLE_GLOBAL_LOGS)
|
||||
Debug.Log($"[Davinci] Cached file has been cleared: {url}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ENABLE_GLOBAL_LOGS)
|
||||
Debug.LogError($"[Davinci] Error while removing cached file: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear all davinci cached files
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static void ClearAllCachedFiles()
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.Delete(filePath, true);
|
||||
|
||||
if (ENABLE_GLOBAL_LOGS)
|
||||
Debug.Log("[Davinci] All Davinci cached files has been cleared.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ENABLE_GLOBAL_LOGS)
|
||||
Debug.LogError($"[Davinci] Error while removing cached file: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/Davinci.cs.meta
Normal file
11
Assets/Scripts/Utils/Davinci.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9b77a5c7e324f6499d232d9e031ae96
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
145
Assets/Scripts/Utils/EncrypHelper.cs
Normal file
145
Assets/Scripts/Utils/EncrypHelper.cs
Normal file
@ -0,0 +1,145 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
|
||||
|
||||
public class EncrypHelper
|
||||
{
|
||||
/// <summary>
|
||||
///静态无参构造
|
||||
/// </summary>
|
||||
static EncrypHelper()
|
||||
{
|
||||
//默认的密钥
|
||||
SecretKey = "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用SHA256加密字符串
|
||||
/// </summary>
|
||||
/// <param name="Source"></param>
|
||||
/// <returns></returns>
|
||||
public static string EncrypToSHA(string Source)
|
||||
{
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] s = UTF8Encoding.UTF8.GetBytes(Source);
|
||||
byte[] t = sha256.ComputeHash(s);
|
||||
return Convert.ToBase64String(t);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 缺省的密钥
|
||||
/// </summary>
|
||||
public static readonly string SecretKey;
|
||||
|
||||
/// <summary>
|
||||
/// 使用缺省密钥字符串加密string
|
||||
/// </summary>
|
||||
/// <param name="original">明文</param>
|
||||
/// <returns>密文</returns>
|
||||
public static string Encrypt(string original)
|
||||
{
|
||||
return Encrypt(original, SecretKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用缺省密钥字符串解密string
|
||||
/// </summary>
|
||||
/// <param name="original">密文</param>
|
||||
/// <returns>明文</returns>
|
||||
public static string Decrypt(string original)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Decrypt(original, SecretKey, System.Text.Encoding.Default);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用给定密钥字符串加密string
|
||||
/// </summary>
|
||||
/// <param name="original">原始文字</param>
|
||||
/// <param name="key">密钥</param>
|
||||
/// <returns>密文</returns>
|
||||
public static string Encrypt(string original, string key)
|
||||
{
|
||||
byte[] buff = System.Text.Encoding.Default.GetBytes(original);
|
||||
byte[] kb = System.Text.Encoding.Default.GetBytes(key);
|
||||
return Convert.ToBase64String(Encrypt(buff, kb));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用给定密钥字符串解密string
|
||||
/// </summary>
|
||||
/// <param name="original">密文</param>
|
||||
/// <param name="key">密钥</param>
|
||||
/// <returns>明文</returns>
|
||||
public static string Decrypt(string original, string key)
|
||||
{
|
||||
return Decrypt(original, key, System.Text.Encoding.Default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用给定密钥字符串解密string,返回指定编码方式明文
|
||||
/// </summary>
|
||||
/// <param name="encrypted">密文</param>
|
||||
/// <param name="key">密钥</param>
|
||||
/// <param name="encoding">字符编码方案</param>
|
||||
/// <returns>明文</returns>
|
||||
public static string Decrypt(string encrypted, string key, Encoding encoding)
|
||||
{
|
||||
byte[] buff = Convert.FromBase64String(encrypted);
|
||||
byte[] kb = System.Text.Encoding.Default.GetBytes(key);
|
||||
return encoding.GetString(Decrypt(buff, kb));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成MD5摘要
|
||||
/// </summary>
|
||||
/// <param name="original">数据源</param>
|
||||
/// <returns>摘要</returns>
|
||||
public static byte[] MakeMd5(byte[] original)
|
||||
{
|
||||
|
||||
MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
|
||||
byte[] keyhash = hashmd5.ComputeHash(original);
|
||||
hashmd5 = null;
|
||||
return keyhash;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用给定密钥加密
|
||||
/// </summary>
|
||||
/// <param name="original">明文</param>
|
||||
/// <param name="key">密钥</param>
|
||||
/// <returns>密文</returns>
|
||||
public static byte[] Encrypt(byte[] original, byte[] key)
|
||||
{
|
||||
TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider();
|
||||
des.Key = MakeMd5(key);
|
||||
des.Mode = CipherMode.ECB;
|
||||
return des.CreateEncryptor().TransformFinalBlock(original, 0, original.Length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用给定密钥解密数据
|
||||
/// </summary>
|
||||
/// <param name="encrypted">密文</param>
|
||||
/// <param name="key">密钥</param>
|
||||
/// <returns>明文</returns>
|
||||
public static byte[] Decrypt(byte[] encrypted, byte[] key)
|
||||
{
|
||||
TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider();
|
||||
des.Key = MakeMd5(key);
|
||||
des.Mode = CipherMode.ECB;
|
||||
return des.CreateDecryptor().TransformFinalBlock(encrypted, 0, encrypted.Length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
11
Assets/Scripts/Utils/EncrypHelper.cs.meta
Normal file
11
Assets/Scripts/Utils/EncrypHelper.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9ee2af5e9deb0c47b98031e6d4ec657
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -359,10 +359,13 @@ namespace Assets.Scripts
|
||||
}
|
||||
public static Dictionary<string, Texture> propTextureCache = new Dictionary<string, Texture>();
|
||||
public delegate Coroutine StartCoroutine(IEnumerator routine);
|
||||
public static void DisplayImage(MaskableGraphic img, string url, bool cache = false,Dictionary<string,Texture> caches = null)
|
||||
public static void DisplayImage(MaskableGraphic img, string url, bool cache = true,Dictionary<string,Texture> caches = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
return;
|
||||
|
||||
Davinci.get().load(url).setCached(cache).into(img).setFadeTime(0).start();
|
||||
return;
|
||||
//可以考虑缓存到硬盘里
|
||||
//Texture2D tex = null;
|
||||
//byte[] fileData;
|
||||
@ -407,6 +410,8 @@ namespace Assets.Scripts
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
return;
|
||||
Davinci.get().load(url).setCached(true).into(img).setFadeTime(0).start();
|
||||
return;
|
||||
if (caches!=null)
|
||||
{
|
||||
if (caches.ContainsKey(url))
|
||||
@ -494,14 +499,11 @@ namespace Assets.Scripts
|
||||
}
|
||||
else
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
var fs = File.Create(filepath);
|
||||
fs.Write(request.downloadHandler.data, 0, request.downloadHandler.data.Length);
|
||||
fs.Close();
|
||||
fs.Dispose();
|
||||
fs = null;
|
||||
});
|
||||
var fs = File.Create(filepath);
|
||||
fs.Write(request.downloadHandler.data, 0, request.downloadHandler.data.Length);
|
||||
fs.Close();
|
||||
fs.Dispose();
|
||||
request.Dispose();
|
||||
}
|
||||
}
|
||||
if (onCompleted != null)
|
||||
|
||||
29
Assets/TestVideoPlayer.cs
Normal file
29
Assets/TestVideoPlayer.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TestVideoPlayer : MonoBehaviour
|
||||
{
|
||||
Animator animator { get; set; }
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
animator = GetComponent<Animator>();
|
||||
animator.Play("idle");
|
||||
}
|
||||
float timer = 1f;
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
timer -= Time.deltaTime;
|
||||
while (timer < 0)
|
||||
{
|
||||
animator.SetFloat("preSpeed", 30f);
|
||||
animator.SetFloat("speed", 30f);
|
||||
animator.SetFloat("grade", 4f);
|
||||
animator.SetFloat("power", 350f);
|
||||
animator.SetFloat("bearing", 0);
|
||||
timer += 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TestVideoPlayer.cs.meta
Normal file
11
Assets/TestVideoPlayer.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3297ace0e54563640a67fd517864d35c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
x
Reference in New Issue
Block a user