reorganize code into asmdefs
This commit is contained in:
parent
f605dd12cc
commit
56ef7262a5
129 changed files with 38412 additions and 1466 deletions
133
Assets/Animation/LightPillar.controller
Normal file
133
Assets/Animation/LightPillar.controller
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1102 &-8361449932007971008
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Idle
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions:
|
||||||
|
- {fileID: -3249429052887645831}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 0}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &-5406772230622531465
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 6791108181048929735}
|
||||||
|
m_Position: {x: 280, y: 180, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: -8361449932007971008}
|
||||||
|
m_Position: {x: 280, y: 120, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 80, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 50, y: 40, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: -8361449932007971008}
|
||||||
|
--- !u!1101 &-3249429052887645831
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 1
|
||||||
|
m_ConditionEvent: TurnOff
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 6791108181048929735}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0.25
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.75
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: LightPillar
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: TurnOff
|
||||||
|
m_Type: 9
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: -5406772230622531465}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!1102 &6791108181048929735
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: TurnOff
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 7400000, guid: b9eec454ea5888a8badf2d10a58b75f5, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
|
@ -1,8 +1,8 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7cdd54e2ee68f04efa76abf0d040e9ad
|
guid: 6d3e0f14e7ab07a378483826d58a3018
|
||||||
NativeFormatImporter:
|
NativeFormatImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
mainObjectFileID: 9100000
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
|
@ -250,7 +250,7 @@ AnimatorStateMachine:
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_AnyStatePosition: {x: 0, y: 80, z: 0}
|
m_AnyStatePosition: {x: 0, y: 80, z: 0}
|
||||||
m_EntryPosition: {x: 0, y: 140, z: 0}
|
m_EntryPosition: {x: 0, y: 140, z: 0}
|
||||||
m_ExitPosition: {x: 730, y: 130, z: 0}
|
m_ExitPosition: {x: 690, y: 130, z: 0}
|
||||||
m_ParentStateMachinePosition: {x: 940, y: 20, z: 0}
|
m_ParentStateMachinePosition: {x: 940, y: 20, z: 0}
|
||||||
m_DefaultState: {fileID: 3578780403887844613}
|
m_DefaultState: {fileID: 3578780403887844613}
|
||||||
--- !u!91 &9100000
|
--- !u!91 &9100000
|
||||||
|
@ -550,7 +550,7 @@ AnimatorStateTransition:
|
||||||
m_TransitionDuration: 0.25
|
m_TransitionDuration: 0.25
|
||||||
m_TransitionOffset: 0
|
m_TransitionOffset: 0
|
||||||
m_ExitTime: 0.875
|
m_ExitTime: 0.875
|
||||||
m_HasExitTime: 1
|
m_HasExitTime: 0
|
||||||
m_HasFixedDuration: 1
|
m_HasFixedDuration: 1
|
||||||
m_InterruptionSource: 0
|
m_InterruptionSource: 0
|
||||||
m_OrderedInterruption: 1
|
m_OrderedInterruption: 1
|
||||||
|
|
301
Assets/Animation/TurnOff.anim
Normal file
301
Assets/Animation/TurnOff.anim
Normal file
|
@ -0,0 +1,301 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!74 &7400000
|
||||||
|
AnimationClip:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: TurnOff
|
||||||
|
serializedVersion: 7
|
||||||
|
m_Legacy: 0
|
||||||
|
m_Compressed: 0
|
||||||
|
m_UseHighQualityCurve: 1
|
||||||
|
m_RotationCurves: []
|
||||||
|
m_CompressedRotationCurves: []
|
||||||
|
m_EulerCurves: []
|
||||||
|
m_PositionCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: {x: 0, y: 0, z: 1}
|
||||||
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: {x: 0, y: -15, z: 1}
|
||||||
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
path:
|
||||||
|
m_ScaleCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: {x: 3, y: 15, z: 3}
|
||||||
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: {x: 3, y: 0, z: 3}
|
||||||
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
path:
|
||||||
|
m_FloatCurves: []
|
||||||
|
m_PPtrCurves: []
|
||||||
|
m_SampleRate: 60
|
||||||
|
m_WrapMode: 0
|
||||||
|
m_Bounds:
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
|
m_ClipBindingConstant:
|
||||||
|
genericBindings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 0
|
||||||
|
attribute: 1
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 4
|
||||||
|
customType: 0
|
||||||
|
isPPtrCurve: 0
|
||||||
|
isIntCurve: 0
|
||||||
|
isSerializeReferenceCurve: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 0
|
||||||
|
attribute: 3
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 4
|
||||||
|
customType: 0
|
||||||
|
isPPtrCurve: 0
|
||||||
|
isIntCurve: 0
|
||||||
|
isSerializeReferenceCurve: 0
|
||||||
|
pptrCurveMapping: []
|
||||||
|
m_AnimationClipSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
|
m_AdditiveReferencePoseTime: 0
|
||||||
|
m_StartTime: 0
|
||||||
|
m_StopTime: 0.33333334
|
||||||
|
m_OrientationOffsetY: 0
|
||||||
|
m_Level: 0
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_HasAdditiveReferencePose: 0
|
||||||
|
m_LoopTime: 0
|
||||||
|
m_LoopBlend: 0
|
||||||
|
m_LoopBlendOrientation: 0
|
||||||
|
m_LoopBlendPositionY: 0
|
||||||
|
m_LoopBlendPositionXZ: 0
|
||||||
|
m_KeepOriginalOrientation: 0
|
||||||
|
m_KeepOriginalPositionY: 1
|
||||||
|
m_KeepOriginalPositionXZ: 0
|
||||||
|
m_HeightFromFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_EditorCurves:
|
||||||
|
- serializedVersion: 2
|
||||||
|
curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.x
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
flags: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: -15
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.y
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
flags: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.z
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
flags: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 3
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: 3
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalScale.x
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
flags: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 15
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalScale.y
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
flags: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 3
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.33333334
|
||||||
|
value: 3
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalScale.z
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
flags: 0
|
||||||
|
m_EulerEditorCurves: []
|
||||||
|
m_HasGenericRootTransform: 1
|
||||||
|
m_HasMotionFloatCurves: 0
|
||||||
|
m_Events: []
|
|
@ -1,8 +1,8 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: aa4803d7cbd2cd0d3938c170ae2e4426
|
guid: b9eec454ea5888a8badf2d10a58b75f5
|
||||||
NativeFormatImporter:
|
NativeFormatImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
mainObjectFileID: 7400000
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
3
Assets/QuickOutline/QuickOutline.asmdef
Normal file
3
Assets/QuickOutline/QuickOutline.asmdef
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"name": "QuickOutline"
|
||||||
|
}
|
7
Assets/QuickOutline/QuickOutline.asmdef.meta
Normal file
7
Assets/QuickOutline/QuickOutline.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e5d376cc74feb79f79202405e1ea4edf
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
142
Assets/Resources/Materials/Glow.mat
Normal file
142
Assets/Resources/Materials/Glow.mat
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-1791616363185936323
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 10
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Glow
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _EMISSION
|
||||||
|
- _SPECULAR_SETUP
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 2
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 1
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0
|
||||||
|
- _SmoothnessTextureChannel: 1
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 0
|
||||||
|
- _XRMotionVectorsPass: 1
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0, g: 0.5921702, b: 1, a: 0.5686275}
|
||||||
|
- _Color: {r: 0, g: 0.5921702, b: 1, a: 0.5686275}
|
||||||
|
- _EmissionColor: {r: 0, g: 15.300821, b: 23.96863, a: 1}
|
||||||
|
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
|
@ -1,8 +1,8 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 5c153b604f1b1916cb5880726d0123d5
|
guid: 87f0b0feb53e8e598a5b7bf31a7a64c8
|
||||||
NativeFormatImporter:
|
NativeFormatImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
mainObjectFileID: 2100000
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
|
@ -1,16 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 7fb754f9e0773ecf5b1fe29c163e1ec2, type: 3}
|
|
||||||
m_Name: HelloEnvironment
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
functions:
|
|
||||||
- {fileID: 11400000, guid: 5c153b604f1b1916cb5880726d0123d5, type: 2}
|
|
|
@ -1,18 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: c278fb50cca0b84469e0af15b5b75ce9, type: 3}
|
|
||||||
m_Name: HelloModule
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
moduleName: hello
|
|
||||||
wasm: {fileID: -8528525496504085160, guid: ba9642a266c04a33d8a1443db2ebb016, type: 3}
|
|
||||||
SkipModuleValidation: 0
|
|
||||||
SkipStartFunction: 0
|
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 5000fd7bd5e859c3aa908dda32789565
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,18 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: e6dc78199a8464287bf7cf7e9e8ff4d3, type: 3}
|
|
||||||
m_Name: HelloRuntime
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
environments:
|
|
||||||
- {fileID: 11400000, guid: aa4803d7cbd2cd0d3938c170ae2e4426, type: 2}
|
|
||||||
modules:
|
|
||||||
- {fileID: 11400000, guid: 5000fd7bd5e859c3aa908dda32789565, type: 2}
|
|
Binary file not shown.
|
@ -1,14 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: a1d86ab1e1c07c78fbb94a44dbb50503, type: 3}
|
|
||||||
m_Name: SayCBinding
|
|
||||||
m_EditorClassIdentifier:
|
|
File diff suppressed because one or more lines are too long
19
Assets/Scripts/Editor/KitsuneCafe.Editor.asmdef
Normal file
19
Assets/Scripts/Editor/KitsuneCafe.Editor.asmdef
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.Editor",
|
||||||
|
"rootNamespace": "KitsuneCafe.Editor",
|
||||||
|
"references": [
|
||||||
|
"GUID:0df146df1749492f7b11eaa6b25805bc",
|
||||||
|
"GUID:6809a292f3d5882afb01093488d605c8"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [
|
||||||
|
"Editor"
|
||||||
|
],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
7
Assets/Scripts/Editor/KitsuneCafe.Editor.asmdef.meta
Normal file
7
Assets/Scripts/Editor/KitsuneCafe.Editor.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9d77bf62fe95f41a4afd9fb228cde5d3
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,9 +0,0 @@
|
||||||
<ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
|
||||||
<uie:Toolbar style="align-items: center;">
|
|
||||||
<uie:ToolbarButton text="Refresh" name="refresh" />
|
|
||||||
</uie:Toolbar>
|
|
||||||
<ui:VisualElement name="container" style="flex-grow: 1; flex-direction: row;">
|
|
||||||
<KitsuneCafe.SOAP.DatabaseListView name="databases" />
|
|
||||||
<ui:ListView name="rows" />
|
|
||||||
</ui:VisualElement>
|
|
||||||
</ui:UXML>
|
|
|
@ -1,10 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: ca5165dd13587e1bfa8c2f2102dd7209
|
|
||||||
ScriptedImporter:
|
|
||||||
internalIDToNameTable: []
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
|
|
@ -1,288 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using KitsuneCafe.Extension;
|
|
||||||
using KitsuneCafe.Sys;
|
|
||||||
using ObservableCollections;
|
|
||||||
using Unity.AppUI.MVVM;
|
|
||||||
using Unity.Properties;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEditor.UIElements;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UIElements;
|
|
||||||
|
|
||||||
namespace KitsuneCafe.SOAP
|
|
||||||
{
|
|
||||||
[ObservableObject]
|
|
||||||
public partial class DatabaseModel : INotifyBindablePropertyChanged, IDataSourceViewHashProvider
|
|
||||||
{
|
|
||||||
private readonly ObservableList<IDatabase> databases = new();
|
|
||||||
public IReadOnlyObservableList<IDatabase> Databases => databases;
|
|
||||||
|
|
||||||
public DatabaseModel()
|
|
||||||
{
|
|
||||||
RefreshDatabaseCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RefreshDatabaseCache()
|
|
||||||
{
|
|
||||||
OnPropertyChanging(nameof(Databases));
|
|
||||||
this.databases.Clear();
|
|
||||||
|
|
||||||
var databases = AssetDatabase.FindAssets(
|
|
||||||
$"t:{typeof(Database<>).Name} a:assets",
|
|
||||||
new[] { "Assets/" }
|
|
||||||
)
|
|
||||||
.Select(AssetDatabase.GUIDToAssetPath)
|
|
||||||
.Select(path => AssetDatabase.LoadAssetAtPath(path, typeof(IDatabase)))
|
|
||||||
.Cast<IDatabase>();
|
|
||||||
|
|
||||||
this.databases.AddRange(databases);
|
|
||||||
OnPropertyChanged(nameof(Databases));
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetViewHashCode()
|
|
||||||
{
|
|
||||||
return databases.GetHashCode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObservableObject]
|
|
||||||
public partial class DatabaseEditorViewModel
|
|
||||||
{
|
|
||||||
[ObservableProperty]
|
|
||||||
[AlsoNotifyChangeFor(nameof(Rows))]
|
|
||||||
private IOption<IDatabase> selected = Option.None<IDatabase>();
|
|
||||||
|
|
||||||
[CreateProperty(ReadOnly = true)]
|
|
||||||
public IEnumerable<object> Rows => selected.MapOr(
|
|
||||||
Enumerable.Empty<object>(),
|
|
||||||
db => ((dynamic)db).Rows
|
|
||||||
);
|
|
||||||
|
|
||||||
private readonly DatabaseModel model;
|
|
||||||
|
|
||||||
public DatabaseEditorViewModel(DatabaseModel model)
|
|
||||||
{
|
|
||||||
this.model = model;
|
|
||||||
}
|
|
||||||
|
|
||||||
[ICommand]
|
|
||||||
private void Select(IDatabase database)
|
|
||||||
{
|
|
||||||
Selected = Option.Some(database);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ICommand]
|
|
||||||
private void Refresh()
|
|
||||||
{
|
|
||||||
model.RefreshDatabaseCache();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObservableObject]
|
|
||||||
public partial class DatabaseListViewModel : INotifyBindablePropertyChanged, IDataSourceViewHashProvider
|
|
||||||
{
|
|
||||||
private readonly DatabaseModel model;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private List<IDatabase> databases;
|
|
||||||
|
|
||||||
public DatabaseListViewModel(DatabaseModel model)
|
|
||||||
{
|
|
||||||
this.model = model;
|
|
||||||
databases = model.Databases.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetViewHashCode()
|
|
||||||
{
|
|
||||||
return databases.GetHashCode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[UxmlElement]
|
|
||||||
public partial class DatabaseListView : ListView
|
|
||||||
{
|
|
||||||
private readonly DatabaseListViewModel viewModel;
|
|
||||||
|
|
||||||
public event Action<IDatabase> DatabaseSelected = delegate { };
|
|
||||||
|
|
||||||
public DatabaseListView(DatabaseListViewModel viewModel) : this()
|
|
||||||
{
|
|
||||||
this.viewModel = viewModel;
|
|
||||||
dataSource = viewModel;
|
|
||||||
|
|
||||||
var binding = new DataBinding
|
|
||||||
{
|
|
||||||
dataSourcePath = PropertyPath.FromName(nameof(DatabaseListViewModel.Databases))
|
|
||||||
};
|
|
||||||
|
|
||||||
binding.sourceToUiConverters.AddConverter((ref IReadOnlyObservableList<IDatabase> xs) => (IList)xs.ToList());
|
|
||||||
SetBinding(nameof(itemsSource), binding);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DatabaseListView() : base()
|
|
||||||
{
|
|
||||||
makeItem = MakeItem;
|
|
||||||
bindItem = BindItem;
|
|
||||||
unbindItem = UnbindItem;
|
|
||||||
selectionChanged += OnSelectedItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnSelectedItem(IEnumerable<object> enumerable)
|
|
||||||
{
|
|
||||||
DatabaseSelected.Invoke((IDatabase)selectedItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UnbindItem(VisualElement element, int index)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BindItem(VisualElement element, int index)
|
|
||||||
{
|
|
||||||
if (element is Label label)
|
|
||||||
{
|
|
||||||
label.text = viewModel.Databases[index].Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private VisualElement MakeItem()
|
|
||||||
{
|
|
||||||
return new Label();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DatabaseItemEditorView : VisualElement
|
|
||||||
{
|
|
||||||
private SerializedObject serializedObject;
|
|
||||||
|
|
||||||
[CreateProperty]
|
|
||||||
public SerializedObject SerializedObject
|
|
||||||
{
|
|
||||||
get => serializedObject;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (serializedObject != value)
|
|
||||||
{
|
|
||||||
serializedObject = value;
|
|
||||||
Rebuild();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public DatabaseItemEditorView()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Rebuild()
|
|
||||||
{
|
|
||||||
if (serializedObject == null) { return; }
|
|
||||||
foreach (var property in serializedObject.Enumerate())
|
|
||||||
{
|
|
||||||
Add(new PropertyField(property));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DatabaseEditorView : VisualElement
|
|
||||||
{
|
|
||||||
private readonly DatabaseEditorViewModel viewModel;
|
|
||||||
|
|
||||||
public DatabaseEditorView(
|
|
||||||
DatabaseEditorViewModel viewModel,
|
|
||||||
DatabaseListView databaseListView
|
|
||||||
)
|
|
||||||
{
|
|
||||||
this.viewModel = viewModel;
|
|
||||||
|
|
||||||
var toolbar = new Toolbar();
|
|
||||||
var refresh = new ToolbarButton(viewModel.RefreshCommand.Execute)
|
|
||||||
{
|
|
||||||
text = "Refresh"
|
|
||||||
};
|
|
||||||
|
|
||||||
toolbar.Add(refresh);
|
|
||||||
Add(toolbar);
|
|
||||||
|
|
||||||
var container = new VisualElement();
|
|
||||||
container.style.flexDirection = FlexDirection.Row;
|
|
||||||
databaseListView.DatabaseSelected += viewModel.SelectCommand.Execute;
|
|
||||||
container.Add(databaseListView);
|
|
||||||
|
|
||||||
var rowListView = new ListView
|
|
||||||
{
|
|
||||||
dataSource = viewModel,
|
|
||||||
makeItem = () => new Label(),
|
|
||||||
bindItem = (ve, i) => ((Label)ve).text = ((UnityEngine.Object)viewModel.Rows.ElementAt(i)).name
|
|
||||||
};
|
|
||||||
|
|
||||||
var itemsBinding = new DataBinding
|
|
||||||
{
|
|
||||||
dataSourcePath = PropertyPath.FromName(nameof(DatabaseEditorViewModel.Rows))
|
|
||||||
};
|
|
||||||
|
|
||||||
rowListView.SetBinding(
|
|
||||||
nameof(ListView.itemsSource),
|
|
||||||
itemsBinding
|
|
||||||
);
|
|
||||||
|
|
||||||
container.Add(rowListView);
|
|
||||||
|
|
||||||
var editor = new DatabaseItemEditorView
|
|
||||||
{
|
|
||||||
dataSource = rowListView
|
|
||||||
};
|
|
||||||
|
|
||||||
var selectedBinding = new DataBinding
|
|
||||||
{
|
|
||||||
dataSourcePath = PropertyPath.FromName(nameof(ListView.selectedItem))
|
|
||||||
};
|
|
||||||
|
|
||||||
selectedBinding.sourceToUiConverters.AddConverter(
|
|
||||||
(ref object selected) => selected == null
|
|
||||||
? null
|
|
||||||
: new SerializedObject((UnityEngine.Object)selected)
|
|
||||||
);
|
|
||||||
|
|
||||||
editor.SetBinding(
|
|
||||||
nameof(DatabaseItemEditorView.SerializedObject),
|
|
||||||
selectedBinding
|
|
||||||
);
|
|
||||||
|
|
||||||
Add(editor);
|
|
||||||
|
|
||||||
Add(container);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DatabaseEditorWindow : EditorWindow
|
|
||||||
{
|
|
||||||
public static Lazy<IServiceProvider> provider = new(() =>
|
|
||||||
{
|
|
||||||
var services = new ServiceCollection();
|
|
||||||
services.AddSingleton<DatabaseModel>()
|
|
||||||
.AddTransient<DatabaseEditorViewModel>()
|
|
||||||
.AddTransient<DatabaseListViewModel>()
|
|
||||||
.AddTransient<DatabaseEditorView>()
|
|
||||||
.AddTransient<DatabaseListView>();
|
|
||||||
|
|
||||||
return services.BuildServiceProvider();
|
|
||||||
});
|
|
||||||
|
|
||||||
[MenuItem("Tools/KitsuneCafe/Database")]
|
|
||||||
public static void Init()
|
|
||||||
{
|
|
||||||
DatabaseEditorWindow wnd = GetWindow<DatabaseEditorWindow>();
|
|
||||||
wnd.titleContent = new GUIContent("Database");
|
|
||||||
|
|
||||||
Vector2 size = new(800, 600);
|
|
||||||
wnd.minSize = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CreateGUI()
|
|
||||||
{
|
|
||||||
rootVisualElement.Add(provider.Value.GetRequiredService<DatabaseEditorView>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: b56daecedefc41313afca33b46f28e49
|
|
6
Assets/Scripts/Entity/IsExternalInit.cs
Normal file
6
Assets/Scripts/Entity/IsExternalInit.cs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
using System.ComponentModel;
|
||||||
|
namespace System.Runtime.CompilerServices
|
||||||
|
{
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
internal class IsExternalInit { }
|
||||||
|
}
|
2
Assets/Scripts/Entity/IsExternalInit.cs.meta
Normal file
2
Assets/Scripts/Entity/IsExternalInit.cs.meta
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6f66438bd5e83db16a8cede339c25e66
|
22
Assets/Scripts/Entity/KitsuneCafe.Entity.asmdef
Normal file
22
Assets/Scripts/Entity/KitsuneCafe.Entity.asmdef
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.Entity",
|
||||||
|
"rootNamespace": "KitsuneCafe.Entities",
|
||||||
|
"references": [
|
||||||
|
"GUID:2f101f87087d58f4ba92ca00188e763d",
|
||||||
|
"GUID:9c739b017e1d4fdabf06fa2d84a463c3",
|
||||||
|
"GUID:0df146df1749492f7b11eaa6b25805bc",
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2",
|
||||||
|
"GUID:1e8869b9d84df9be1bcdaef44eeb0bac",
|
||||||
|
"GUID:6809a292f3d5882afb01093488d605c8",
|
||||||
|
"GUID:77221876cc6b8244180b96e320b1bcd4"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
7
Assets/Scripts/Entity/KitsuneCafe.Entity.asmdef.meta
Normal file
7
Assets/Scripts/Entity/KitsuneCafe.Entity.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 24b0eb9082688e682a1d343cebe3d689
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,5 +1,4 @@
|
||||||
using KitsuneCafe.Extension;
|
using KitsuneCafe.Extension;
|
||||||
using KitsuneCafe.ItemSystem;
|
|
||||||
using KitsuneCafe.Sys;
|
using KitsuneCafe.Sys;
|
||||||
using KitsuneCafe.Sys.Attributes;
|
using KitsuneCafe.Sys.Attributes;
|
||||||
using R3;
|
using R3;
|
||||||
|
@ -7,7 +6,7 @@ using UnityEngine;
|
||||||
|
|
||||||
namespace KitsuneCafe.Entities
|
namespace KitsuneCafe.Entities
|
||||||
{
|
{
|
||||||
public class EntityAnimator : MonoBehaviour
|
public class MotorAnimator : MonoBehaviour
|
||||||
{
|
{
|
||||||
private const float epsilon = 0.05f;
|
private const float epsilon = 0.05f;
|
||||||
|
|
||||||
|
@ -52,49 +51,14 @@ namespace KitsuneCafe.Entities
|
||||||
[SerializeField, AnimatorParam("animator")]
|
[SerializeField, AnimatorParam("animator")]
|
||||||
private string hardLandingParam;
|
private string hardLandingParam;
|
||||||
|
|
||||||
[Header("Combat")]
|
|
||||||
[SerializeField, AnimatorParam("animator")]
|
|
||||||
private string readyParam;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private EquipmentInstance equipment;
|
|
||||||
|
|
||||||
private void OnValidate()
|
private void OnValidate()
|
||||||
{
|
{
|
||||||
if (animator == null)
|
this.TryGetComponentIfNull(ref animator);
|
||||||
{
|
this.TryGetComponentIfNull(ref rigidbody);
|
||||||
animator = GetComponent<Animator>();
|
this.TryGetComponentIfNull(ref spring);
|
||||||
}
|
this.TryGetComponentIfNull(ref motor);
|
||||||
|
this.TryGetComponentIfNull(ref airMotor);
|
||||||
if (spring == null)
|
this.TryGetComponentIfNull(ref sprint);
|
||||||
{
|
|
||||||
spring = GetComponent<Spring>();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rigidbody == null)
|
|
||||||
{
|
|
||||||
rigidbody = GetComponent<Rigidbody>();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (motor == null)
|
|
||||||
{
|
|
||||||
motor = GetComponent<Motor>();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (airMotor == null)
|
|
||||||
{
|
|
||||||
airMotor = GetComponent<AirMotor>();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sprint == null)
|
|
||||||
{
|
|
||||||
sprint = GetComponent<SprintFeature>();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (equipment == null)
|
|
||||||
{
|
|
||||||
equipment = GetComponent<EquipmentInstance>();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -123,14 +87,6 @@ namespace KitsuneCafe.Entities
|
||||||
.AddTo(ref d);
|
.AddTo(ref d);
|
||||||
|
|
||||||
|
|
||||||
Observable.FromEventHandler<bool>(
|
|
||||||
e => equipment.Readied += e,
|
|
||||||
e => equipment.Readied -= e
|
|
||||||
)
|
|
||||||
.Select(eh => eh.e)
|
|
||||||
.Subscribe(ready => animator.SetBool(readyParam, ready))
|
|
||||||
.AddTo(ref d);
|
|
||||||
|
|
||||||
Observable.FromEventHandler<LandingForce>(
|
Observable.FromEventHandler<LandingForce>(
|
||||||
e => airMotor.Landed += e,
|
e => airMotor.Landed += e,
|
||||||
e => airMotor.Landed -= e
|
e => airMotor.Landed -= e
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: af0ee52c05fe2ee4d90143efa7204a07
|
guid: 849e1b8211e5d460082659f5a048abd1
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 3f745ff4441ac838eb0807da4d23ec40
|
guid: e7b7257860d446fac81a2dacb936b491
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
17
Assets/Scripts/Event/KitsuneCafe.Event.asmdef
Normal file
17
Assets/Scripts/Event/KitsuneCafe.Event.asmdef
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.Event",
|
||||||
|
"rootNamespace": "KitsuneCafe.Event",
|
||||||
|
"references": [
|
||||||
|
"GUID:0df146df1749492f7b11eaa6b25805bc",
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
7
Assets/Scripts/Event/KitsuneCafe.Event.asmdef.meta
Normal file
7
Assets/Scripts/Event/KitsuneCafe.Event.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3b2416da943b7c99699188893bdfd798
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,7 +1,7 @@
|
||||||
using KitsuneCafe.Sys.Attributes;
|
using KitsuneCafe.Sys.Attributes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace KitsuneCafe.Animation
|
namespace KitsuneCafe.Event
|
||||||
{
|
{
|
||||||
public class TriggerAnimation : MonoBehaviour
|
public class TriggerAnimation : MonoBehaviour
|
||||||
{
|
{
|
3
Assets/Scripts/Extension/KitsuneCafe.Extension.asmref
Normal file
3
Assets/Scripts/Extension/KitsuneCafe.Extension.asmref
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"reference": "GUID:fc3a73c43268597c9a43e6d5faed34d2"
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7dc6326ae3fba8fd8b7928e58c6ff06f
|
||||||
|
AssemblyDefinitionReferenceImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
17
Assets/Scripts/Input/KitsuneCafe.Input.asmdef
Normal file
17
Assets/Scripts/Input/KitsuneCafe.Input.asmdef
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.Input",
|
||||||
|
"rootNamespace": "KitsuneCafe.Input",
|
||||||
|
"references": [
|
||||||
|
"GUID:0df146df1749492f7b11eaa6b25805bc",
|
||||||
|
"GUID:75469ad4d38634e559750d17036d5f7c"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
7
Assets/Scripts/Input/KitsuneCafe.Input.asmdef.meta
Normal file
7
Assets/Scripts/Input/KitsuneCafe.Input.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1e8869b9d84df9be1bcdaef44eeb0bac
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
21
Assets/Scripts/Interaction/KitsuneCafe.Interaction.asmdef
Normal file
21
Assets/Scripts/Interaction/KitsuneCafe.Interaction.asmdef
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.Interaction",
|
||||||
|
"rootNamespace": "KitsuneCafe.Interaction",
|
||||||
|
"references": [
|
||||||
|
"GUID:0df146df1749492f7b11eaa6b25805bc",
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2",
|
||||||
|
"GUID:309aea25bc6af538c82f3ccffd0d15f6",
|
||||||
|
"GUID:6809a292f3d5882afb01093488d605c8",
|
||||||
|
"GUID:77221876cc6b8244180b96e320b1bcd4",
|
||||||
|
"GUID:e5d376cc74feb79f79202405e1ea4edf"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fb56dfb1fa1540fafad907c144c093b9
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 90b993d7c2f96489eba5b4c5fd9e9d21
|
guid: 4adc4a21bca6da13e92c11bca98a3416
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
|
@ -1,8 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using KitsuneCafe.Extension;
|
using KitsuneCafe.Extension;
|
||||||
using KitsuneCafe.Input;
|
using KitsuneCafe.Input;
|
||||||
using KitsuneCafe.ItemSystem;
|
using KitsuneCafe.ItemSystem.Entities;
|
||||||
using KitsuneCafe.SOAP;
|
using KitsuneCafe.SOAP;
|
||||||
|
using KitsuneCafe.SOAP.Input;
|
||||||
using R3;
|
using R3;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
51
Assets/Scripts/Item/Entity/EquipmentAnimator.cs
Normal file
51
Assets/Scripts/Item/Entity/EquipmentAnimator.cs
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
using System.Threading;
|
||||||
|
using KitsuneCafe.Extension;
|
||||||
|
using KitsuneCafe.Sys.Attributes;
|
||||||
|
using R3;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace KitsuneCafe.ItemSystem.Entities
|
||||||
|
{
|
||||||
|
public class EquipmentAnimator : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Header("Dependencies")]
|
||||||
|
[SerializeField]
|
||||||
|
private Animator animator;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private EquipmentInstance equipment;
|
||||||
|
|
||||||
|
[Header("Combat")]
|
||||||
|
[SerializeField, AnimatorParam("animator")]
|
||||||
|
private string readyParam;
|
||||||
|
|
||||||
|
private CancellationTokenSource disableCancellationTokenSource;
|
||||||
|
private CancellationToken disableCancellationToken => disableCancellationTokenSource.Token;
|
||||||
|
|
||||||
|
private void OnValidate()
|
||||||
|
{
|
||||||
|
this.TryGetComponentIfNull(ref equipment);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnEnable()
|
||||||
|
{
|
||||||
|
disableCancellationTokenSource = new();
|
||||||
|
|
||||||
|
var d = Disposable.CreateBuilder();
|
||||||
|
Observable.FromEventHandler<bool>(
|
||||||
|
e => equipment.Readied += e,
|
||||||
|
e => equipment.Readied -= e
|
||||||
|
)
|
||||||
|
.Select(eh => eh.e)
|
||||||
|
.Subscribe(ready => animator.SetBool(readyParam, ready))
|
||||||
|
.AddTo(ref d);
|
||||||
|
|
||||||
|
d.RegisterTo(disableCancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisable()
|
||||||
|
{
|
||||||
|
disableCancellationTokenSource.Cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
Assets/Scripts/Item/Entity/EquipmentAnimator.cs.meta
Normal file
2
Assets/Scripts/Item/Entity/EquipmentAnimator.cs.meta
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3bd80731f422bf155b053f861eb3fe4b
|
|
@ -4,7 +4,7 @@ using KitsuneCafe.SOAP;
|
||||||
using R3;
|
using R3;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace KitsuneCafe.ItemSystem
|
namespace KitsuneCafe.ItemSystem.Entities
|
||||||
{
|
{
|
||||||
public record ChangedEquipmentEvent(IEquippable Previous, IEquippable Current);
|
public record ChangedEquipmentEvent(IEquippable Previous, IEquippable Current);
|
||||||
|
|
6
Assets/Scripts/Item/Entity/IsExternalInit.cs
Normal file
6
Assets/Scripts/Item/Entity/IsExternalInit.cs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
using System.ComponentModel;
|
||||||
|
namespace System.Runtime.CompilerServices
|
||||||
|
{
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
internal class IsExternalInit { }
|
||||||
|
}
|
2
Assets/Scripts/Item/Entity/IsExternalInit.cs.meta
Normal file
2
Assets/Scripts/Item/Entity/IsExternalInit.cs.meta
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eed32b3fb5189a77a9a5b4a2c64d306d
|
22
Assets/Scripts/Item/Entity/KitsuneCafe.Item.Entity.asmdef
Normal file
22
Assets/Scripts/Item/Entity/KitsuneCafe.Item.Entity.asmdef
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.Item.Entity",
|
||||||
|
"rootNamespace": "KitsuneCafe.Item.Entity",
|
||||||
|
"references": [
|
||||||
|
"GUID:309aea25bc6af538c82f3ccffd0d15f6",
|
||||||
|
"GUID:24b0eb9082688e682a1d343cebe3d689",
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2",
|
||||||
|
"GUID:1e8869b9d84df9be1bcdaef44eeb0bac",
|
||||||
|
"GUID:6809a292f3d5882afb01093488d605c8",
|
||||||
|
"GUID:02b21c019373d1001a43d867085bbbca",
|
||||||
|
"GUID:566c1e83d9618ee13bf2abe64f1b1fb6"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ca2bbb18e83536079bc13a13c0acbdf2
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,6 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using KitsuneCafe.Sys;
|
using KitsuneCafe.Sys;
|
||||||
using KitsuneCafe.Sys.Attributes;
|
using KitsuneCafe.Sys.Attributes;
|
||||||
|
|
21
Assets/Scripts/Item/KitsuneCafe.ItemSystem.asmdef
Normal file
21
Assets/Scripts/Item/KitsuneCafe.ItemSystem.asmdef
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.ItemSystem",
|
||||||
|
"rootNamespace": "KitsuneCafe.ItemSystem",
|
||||||
|
"references": [
|
||||||
|
"GUID:0df146df1749492f7b11eaa6b25805bc",
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2",
|
||||||
|
"GUID:6809a292f3d5882afb01093488d605c8",
|
||||||
|
"GUID:24b0eb9082688e682a1d343cebe3d689",
|
||||||
|
"GUID:9e24947de15b9834991c9d8411ea37cf",
|
||||||
|
"GUID:84651a3751eca9349aac36a66bba901b"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
7
Assets/Scripts/Item/KitsuneCafe.ItemSystem.asmdef.meta
Normal file
7
Assets/Scripts/Item/KitsuneCafe.ItemSystem.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 309aea25bc6af538c82f3ccffd0d15f6
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
20
Assets/Scripts/KitsuneCafe.asmdef
Normal file
20
Assets/Scripts/KitsuneCafe.asmdef
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"GUID:2f101f87087d58f4ba92ca00188e763d",
|
||||||
|
"GUID:9c739b017e1d4fdabf06fa2d84a463c3",
|
||||||
|
"GUID:15fc0a57446b3144c949da3e2b9737a9",
|
||||||
|
"GUID:caca889fed6088d40b22c2d7e2909c31",
|
||||||
|
"GUID:77221876cc6b8244180b96e320b1bcd4"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
7
Assets/Scripts/KitsuneCafe.asmdef.meta
Normal file
7
Assets/Scripts/KitsuneCafe.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0df146df1749492f7b11eaa6b25805bc
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,25 +0,0 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace KitsuneCafe.SOAP
|
|
||||||
{
|
|
||||||
public interface IDatabase
|
|
||||||
{
|
|
||||||
string Name { get; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IDatabase<T> : IDatabase
|
|
||||||
{
|
|
||||||
IEnumerable<T> Rows { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Database<T> : ScriptableObject, IDatabase<T>
|
|
||||||
{
|
|
||||||
public string Name => name;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private T[] rows;
|
|
||||||
public IEnumerable<T> Rows => rows;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: e96ae9a86b93ea184a6fefc60882952b
|
|
|
@ -1,9 +0,0 @@
|
||||||
using KitsuneCafe.ItemSystem;
|
|
||||||
using KitsuneCafe.Sys;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace KitsuneCafe.SOAP
|
|
||||||
{
|
|
||||||
[CreateAssetMenu(menuName = KitsuneCafeMenu.SoapCollectionDatabase + "Item Database")]
|
|
||||||
public class ItemDatabase : Database<Item> { }
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 4a40f3c8fb8cd12f2bc6dd6cdcdbad1d
|
|
|
@ -2,7 +2,7 @@ using KitsuneCafe.Input;
|
||||||
using KitsuneCafe.Sys;
|
using KitsuneCafe.Sys;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace KitsuneCafe.SOAP
|
namespace KitsuneCafe.SOAP.Input
|
||||||
{
|
{
|
||||||
[CreateAssetMenu(fileName = "ControlSchemeValue", menuName = KitsuneCafeMenu.SoapValue + "ControlScheme")]
|
[CreateAssetMenu(fileName = "ControlSchemeValue", menuName = KitsuneCafeMenu.SoapValue + "ControlScheme")]
|
||||||
public class ControlSchemeValue : ReactiveValue<ControlScheme>
|
public class ControlSchemeValue : ReactiveValue<ControlScheme>
|
|
@ -1,9 +1,9 @@
|
||||||
using KitsuneCafe.SOAP;
|
using KitsuneCafe.Input;
|
||||||
using R3;
|
using R3;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
|
|
||||||
namespace KitsuneCafe.Input
|
namespace KitsuneCafe.SOAP.Input
|
||||||
{
|
{
|
||||||
public class InputChangeHandler : MonoBehaviour
|
public class InputChangeHandler : MonoBehaviour
|
||||||
{
|
{
|
19
Assets/Scripts/SOAP/Input/KitsuneCafe.SOAP.Input.asmdef
Normal file
19
Assets/Scripts/SOAP/Input/KitsuneCafe.SOAP.Input.asmdef
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.SOAP.Input",
|
||||||
|
"rootNamespace": "KitsuneCafe.SOAP.Input",
|
||||||
|
"references": [
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2",
|
||||||
|
"GUID:1e8869b9d84df9be1bcdaef44eeb0bac",
|
||||||
|
"GUID:6809a292f3d5882afb01093488d605c8",
|
||||||
|
"GUID:75469ad4d38634e559750d17036d5f7c"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 02b21c019373d1001a43d867085bbbca
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,5 +1,6 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ba9642a266c04a33d8a1443db2ebb016
|
guid: 2191524ab002b63598638beba332c7cf
|
||||||
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.SOAP.ItemSystem",
|
||||||
|
"rootNamespace": "KitsuneCafe.SOAP.ItemSystem",
|
||||||
|
"references": [
|
||||||
|
"GUID:309aea25bc6af538c82f3ccffd0d15f6",
|
||||||
|
"GUID:6809a292f3d5882afb01093488d605c8",
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 566c1e83d9618ee13bf2abe64f1b1fb6
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
20
Assets/Scripts/SOAP/KitsuneCafe.SOAP.asmdef
Normal file
20
Assets/Scripts/SOAP/KitsuneCafe.SOAP.asmdef
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "KitsuneCafe.SOAP",
|
||||||
|
"rootNamespace": "KitsuneCafe.SOAP",
|
||||||
|
"references": [
|
||||||
|
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||||
|
"GUID:0df146df1749492f7b11eaa6b25805bc",
|
||||||
|
"GUID:fc3a73c43268597c9a43e6d5faed34d2",
|
||||||
|
"GUID:1e8869b9d84df9be1bcdaef44eeb0bac",
|
||||||
|
"GUID:77221876cc6b8244180b96e320b1bcd4"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
7
Assets/Scripts/SOAP/KitsuneCafe.SOAP.asmdef.meta
Normal file
7
Assets/Scripts/SOAP/KitsuneCafe.SOAP.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6809a292f3d5882afb01093488d605c8
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,41 +0,0 @@
|
||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace KitsuneCafe.Scripting
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class BindingPath
|
|
||||||
{
|
|
||||||
[SerializeField]
|
|
||||||
private string module;
|
|
||||||
public string Module => module;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private string entity;
|
|
||||||
public string Entity => entity;
|
|
||||||
|
|
||||||
public static implicit operator (string, string)(BindingPath path) => (path.Module, path.Entity);
|
|
||||||
public static implicit operator BindingPath((string, string) path) => new BindingPath(path.Item1, path.Item2);
|
|
||||||
|
|
||||||
public BindingPath(string module, string entity)
|
|
||||||
{
|
|
||||||
this.module = module;
|
|
||||||
this.entity = entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Equals(object obj)
|
|
||||||
{
|
|
||||||
return base.Equals(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
return HashCode.Combine(module, entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return $"{module}:{entity}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 38efbecfc805be3c786e4103c80659ae
|
|
|
@ -1,29 +0,0 @@
|
||||||
using UnityEngine;
|
|
||||||
using UnityEditor.AssetImporters;
|
|
||||||
using System.IO;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
|
|
||||||
namespace KitsuneCafe.Scripting
|
|
||||||
{
|
|
||||||
[ScriptedImporter(1, "wasm")]
|
|
||||||
public class WasmImporter : ScriptedImporter
|
|
||||||
{
|
|
||||||
public override void OnImportAsset(AssetImportContext ctx)
|
|
||||||
{
|
|
||||||
byte[] data = File.ReadAllBytes(ctx.assetPath);
|
|
||||||
|
|
||||||
WasmAsset wasmAsset = ScriptableObject.CreateInstance<WasmAsset>();
|
|
||||||
wasmAsset.data = data;
|
|
||||||
|
|
||||||
var hash = Hash(data);
|
|
||||||
ctx.AddObjectToAsset(hash.ToString(), wasmAsset);
|
|
||||||
ctx.SetMainObject(wasmAsset);
|
|
||||||
}
|
|
||||||
|
|
||||||
private byte[] Hash(byte[] buffer)
|
|
||||||
{
|
|
||||||
using var md5 = MD5.Create();
|
|
||||||
return md5.ComputeHash(buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: e59d983acfd8a9f0b9ab00905bd3a44d
|
|
|
@ -1,39 +0,0 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
using KitsuneCafe.Sys;
|
|
||||||
using UnityEngine;
|
|
||||||
using Wacs.Core.Runtime;
|
|
||||||
|
|
||||||
namespace KitsuneCafe.Scripting
|
|
||||||
{
|
|
||||||
public interface IEnvironment
|
|
||||||
{
|
|
||||||
void Bind(WasmRuntime runtime, RuntimeState state);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RuntimeState : Dictionary<BindingPath, IFunctionState> { }
|
|
||||||
|
|
||||||
[CreateAssetMenu(menuName = KitsuneCafeMenu.Module + "Environment")]
|
|
||||||
public class Environment : ScriptableObject, IEnvironment
|
|
||||||
{
|
|
||||||
[SerializeField]
|
|
||||||
private List<FunctionBinding> functions = new();
|
|
||||||
|
|
||||||
public void Bind(WasmRuntime runtime, RuntimeState state)
|
|
||||||
{
|
|
||||||
BindFunctions(runtime, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BindFunctions(WasmRuntime runtime, RuntimeState state)
|
|
||||||
{
|
|
||||||
foreach (var fn in functions)
|
|
||||||
{
|
|
||||||
var result = fn.Bind(runtime);
|
|
||||||
|
|
||||||
if (result.IsSome())
|
|
||||||
{
|
|
||||||
state.Add(fn.BindingPath, result.Unwrap());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 7fb754f9e0773ecf5b1fe29c163e1ec2
|
|
|
@ -1,30 +0,0 @@
|
||||||
using KitsuneCafe.Sys;
|
|
||||||
using UnityEngine;
|
|
||||||
using Wacs.Core.Runtime;
|
|
||||||
using Wacs.Core.Types;
|
|
||||||
using Wacs.Core.Types.Defs;
|
|
||||||
|
|
||||||
namespace KitsuneCafe.Scripting
|
|
||||||
{
|
|
||||||
[CreateAssetMenu(menuName = KitsuneCafeMenu.ModuleBinding + "Global Value")]
|
|
||||||
public class GlobalValueBinding : ScriptableObject, IHostBinding
|
|
||||||
{
|
|
||||||
[SerializeField]
|
|
||||||
private BindingPath bindingPath;
|
|
||||||
public BindingPath BindingPath => bindingPath;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private ValType type;
|
|
||||||
public ValType Type => type;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private Mutability mutability = Mutability.Immutable;
|
|
||||||
public Mutability Mutability => mutability;
|
|
||||||
|
|
||||||
public void Bind(WasmRuntime runtime)
|
|
||||||
{
|
|
||||||
var globalType = new GlobalType(type, mutability);
|
|
||||||
//runtime.BindHostGlobal((module, entity), globalType, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 5c303c023438bace9a083b7a9d8d799d
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue