Modified animation, updated dice roll logic.

This commit is contained in:
Ashby Issac 2026-02-12 14:11:08 +05:30
parent 8b7efc158e
commit 370c9f4b57
11 changed files with 713 additions and 412 deletions

View File

@ -1,16 +1,67 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1102 &-4887026682082772945 --- !u!1101 &-6898229064500072479
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: RollDice
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -4380509804427687874}
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!1101 &-4741003227895343028
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: RollDice
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -4380509804427687874}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-4380509804427687874
AnimatorState: AnimatorState:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: DiceRoll_anim m_Name: DiceRoll
m_Speed: 1 m_Speed: 1
m_CycleOffset: 0 m_CycleOffset: 0
m_Transitions: [] m_Transitions:
- {fileID: 6818879043199705446}
m_StateMachineBehaviours: [] m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0} m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0 m_IKOnFeet: 0
@ -34,7 +85,13 @@ AnimatorController:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Dice View m_Name: Dice View
serializedVersion: 5 serializedVersion: 5
m_AnimatorParameters: [] m_AnimatorParameters:
- m_Name: RollDice
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers: m_AnimatorLayers:
- serializedVersion: 5 - serializedVersion: 5
m_Name: Base Layer m_Name: Base Layer
@ -58,15 +115,68 @@ AnimatorStateMachine:
m_Name: Base Layer m_Name: Base Layer
m_ChildStates: m_ChildStates:
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: -4887026682082772945} m_State: {fileID: 8906461555241454014}
m_Position: {x: 200, y: 0, z: 0} m_Position: {x: 330, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: -4380509804427687874}
m_Position: {x: 330, y: 20, z: 0}
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: [] m_AnyStateTransitions:
- {fileID: -4741003227895343028}
m_EntryTransitions: [] m_EntryTransitions: []
m_StateMachineTransitions: {} m_StateMachineTransitions: {}
m_StateMachineBehaviours: [] m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0} m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0} m_EntryPosition: {x: 60, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -4887026682082772945} m_DefaultState: {fileID: 8906461555241454014}
--- !u!1101 &6818879043199705446
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 8906461555241454014}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 1
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &8906461555241454014
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DiceRoll_Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -6898229064500072479}
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: 1e051fb85c10145a4a7b1545d2b8eab8, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

View File

@ -132,12 +132,12 @@ TextureImporter:
name: Dice_0 name: Dice_0
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 112 x: 162
y: 378 y: 429
width: 325 width: 223
height: 325 height: 223
alignment: 0 alignment: 0
pivot: {x: 0.5, y: 0.5} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -153,12 +153,12 @@ TextureImporter:
name: Dice_2 name: Dice_2
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 112 x: 162
y: 669 y: 722
width: 325 width: 223
height: 325 height: 223
alignment: 0 alignment: 0
pivot: {x: 0.5, y: 0.5} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -174,12 +174,12 @@ TextureImporter:
name: Dice_3 name: Dice_3
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 406 x: 455
y: 378 y: 429
width: 325 width: 226
height: 325 height: 223
alignment: 0 alignment: 0
pivot: {x: 0.5, y: 0.5} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -195,12 +195,12 @@ TextureImporter:
name: Dice_4 name: Dice_4
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 406 x: 455
y: 669 y: 722
width: 325 width: 226
height: 325 height: 223
alignment: 0 alignment: 0
pivot: {x: 0.5, y: 0.5} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -216,12 +216,12 @@ TextureImporter:
name: Dice_5 name: Dice_5
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 406 x: 455
y: 87 y: 136
width: 325 width: 226
height: 325 height: 223
alignment: 0 alignment: 0
pivot: {x: 0.5, y: 0.5} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -237,12 +237,12 @@ TextureImporter:
name: Dice_6 name: Dice_6
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 112 x: 162
y: 87 y: 136
width: 325 width: 223
height: 325 height: 223
alignment: 0 alignment: 0
pivot: {x: 0.5, y: 0.5} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []

View File

@ -0,0 +1,60 @@
%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: DiceIdle
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
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: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
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: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events:
- time: 0
functionName: OnReturnedToIdle
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1e051fb85c10145a4a7b1545d2b8eab8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,7 +6,7 @@ AnimationClip:
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: DiceRoll_anim m_Name: DiceRoll
serializedVersion: 6 serializedVersion: 6
m_Legacy: 0 m_Legacy: 0
m_Compressed: 0 m_Compressed: 0
@ -134,6 +134,15 @@ AnimationClip:
weightedMode: 0 weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1.0333333
value: {x: 0, y: 0, z: 0}
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_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
@ -145,7 +154,7 @@ AnimationClip:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: {x: 1, y: 1, z: 1} value: {x: 1.3, y: 1.3, z: 1.3}
inSlope: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0 tangentMode: 0
@ -153,8 +162,26 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3 - serializedVersion: 3
time: 0.083333336 time: 0.16666667
value: {x: 1.2, y: 1.2, z: 1.2} value: {x: 1.28, y: 1.28, z: 1.28}
inSlope: {x: -0.1049999, y: -0.1049999, z: -0.1049999}
outSlope: {x: -0.1049999, y: -0.1049999, z: -0.1049999}
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: 1.265, y: 1.265, z: 1.265}
inSlope: {x: -0.08999992, y: -0.08999992, z: -0.08999992}
outSlope: {x: -0.08999992, y: -0.08999992, z: -0.08999992}
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.5
value: {x: 1.25, y: 1.25, z: 1.25}
inSlope: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0 tangentMode: 0
@ -162,7 +189,34 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3 - serializedVersion: 3
time: 0.9166667 time: 0.6666667
value: {x: 1.265, y: 1.265, z: 1.265}
inSlope: {x: 0.08999992, y: 0.08999992, z: 0.08999992}
outSlope: {x: 0.08999992, y: 0.08999992, z: 0.08999992}
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.8333333
value: {x: 1.28, y: 1.28, z: 1.28}
inSlope: {x: 0.10499991, y: 0.10499991, z: 0.10499991}
outSlope: {x: 0.10499991, y: 0.10499991, z: 0.10499991}
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: 1
value: {x: 1.3, y: 1.3, z: 1.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: 1.0333333
value: {x: 1, y: 1, z: 1} value: {x: 1, y: 1, z: 1}
inSlope: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0}
@ -203,6 +257,8 @@ AnimationClip:
value: {fileID: 21300000, guid: badd09bdd1cad4e869f5a86093eb9100, type: 3} value: {fileID: 21300000, guid: badd09bdd1cad4e869f5a86093eb9100, type: 3}
- time: 1 - time: 1
value: {fileID: 21300000, guid: b319e1c209cba4553984a082f038f4d3, type: 3} value: {fileID: 21300000, guid: b319e1c209cba4553984a082f038f4d3, type: 3}
- time: 1.0333333
value: {fileID: 21300000, guid: badd09bdd1cad4e869f5a86093eb9100, type: 3}
attribute: m_Sprite attribute: m_Sprite
path: Dice path: Dice
classID: 114 classID: 114
@ -249,17 +305,18 @@ AnimationClip:
- {fileID: 21300000, guid: 390d47ba6df534413b44212f4f3e46ab, type: 3} - {fileID: 21300000, guid: 390d47ba6df534413b44212f4f3e46ab, type: 3}
- {fileID: 21300000, guid: badd09bdd1cad4e869f5a86093eb9100, type: 3} - {fileID: 21300000, guid: badd09bdd1cad4e869f5a86093eb9100, type: 3}
- {fileID: 21300000, guid: b319e1c209cba4553984a082f038f4d3, type: 3} - {fileID: 21300000, guid: b319e1c209cba4553984a082f038f4d3, type: 3}
- {fileID: 21300000, guid: badd09bdd1cad4e869f5a86093eb9100, type: 3}
m_AnimationClipSettings: m_AnimationClipSettings:
serializedVersion: 2 serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0 m_AdditiveReferencePoseTime: 0
m_StartTime: 0 m_StartTime: 0
m_StopTime: 1.0166667 m_StopTime: 1.05
m_OrientationOffsetY: 0 m_OrientationOffsetY: 0
m_Level: 0 m_Level: 0
m_CycleOffset: 0 m_CycleOffset: 0
m_HasAdditiveReferencePose: 0 m_HasAdditiveReferencePose: 0
m_LoopTime: 1 m_LoopTime: 0
m_LoopBlend: 0 m_LoopBlend: 0
m_LoopBlendOrientation: 0 m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0 m_LoopBlendPositionY: 0
@ -390,6 +447,15 @@ AnimationClip:
weightedMode: 0 weightedMode: 0
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3
time: 1.0333333
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
@ -517,6 +583,15 @@ AnimationClip:
weightedMode: 0 weightedMode: 0
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3
time: 1.0333333
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
@ -644,6 +719,15 @@ AnimationClip:
weightedMode: 0 weightedMode: 0
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3
time: 1.0333333
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
@ -656,7 +740,7 @@ AnimationClip:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: 1 value: 1.3
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136
@ -664,8 +748,26 @@ AnimationClip:
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.083333336 time: 0.16666667
value: 1.2 value: 1.28
inSlope: -0.1049999
outSlope: -0.1049999
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1.265
inSlope: -0.08999992
outSlope: -0.08999992
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 1.25
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136
@ -673,7 +775,34 @@ AnimationClip:
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.9166667 time: 0.6666667
value: 1.265
inSlope: 0.08999992
outSlope: 0.08999992
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.8333333
value: 1.28
inSlope: 0.10499991
outSlope: 0.10499991
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1.3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1.0333333
value: 1 value: 1
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
@ -693,7 +822,7 @@ AnimationClip:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: 1 value: 1.3
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136
@ -701,8 +830,26 @@ AnimationClip:
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.083333336 time: 0.16666667
value: 1.2 value: 1.28
inSlope: -0.1049999
outSlope: -0.1049999
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1.265
inSlope: -0.08999992
outSlope: -0.08999992
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 1.25
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136
@ -710,7 +857,34 @@ AnimationClip:
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.9166667 time: 0.6666667
value: 1.265
inSlope: 0.08999992
outSlope: 0.08999992
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.8333333
value: 1.28
inSlope: 0.10499991
outSlope: 0.10499991
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1.3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1.0333333
value: 1 value: 1
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
@ -730,7 +904,7 @@ AnimationClip:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: 1 value: 1.3
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136
@ -738,8 +912,26 @@ AnimationClip:
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.083333336 time: 0.16666667
value: 1.2 value: 1.28
inSlope: -0.1049999
outSlope: -0.1049999
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1.265
inSlope: -0.08999992
outSlope: -0.08999992
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 1.25
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136
@ -747,7 +939,34 @@ AnimationClip:
inWeight: 0.33333334 inWeight: 0.33333334
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.9166667 time: 0.6666667
value: 1.265
inSlope: 0.08999992
outSlope: 0.08999992
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.8333333
value: 1.28
inSlope: 0.10499991
outSlope: 0.10499991
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1.3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1.0333333
value: 1 value: 1
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
@ -795,4 +1014,11 @@ AnimationClip:
script: {fileID: 0} script: {fileID: 0}
m_HasGenericRootTransform: 0 m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0 m_HasMotionFloatCurves: 0
m_Events: [] m_Events:
- time: 1.0333333
functionName: OnDiceRollingCompleted
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0

View File

@ -132,12 +132,12 @@ TextureImporter:
name: freepik__background__84200_0 name: freepik__background__84200_0
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 159 x: 267
y: 150 y: 265
width: 750 width: 534
height: 750 height: 520
alignment: 0 alignment: 0
pivot: {x: 0.5, y: 0.5} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []

View File

@ -2,35 +2,47 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
public enum DiceSideVal
{
One = 0,
Two = 1,
Three = 2,
Four = 3,
Five = 4,
Six = 5,
}
[Serializable]
public class DiceSideData
{
public DiceSideVal sideVal;
public Sprite sprite;
}
public class DiceView : MonoBehaviour, IBase public class DiceView : MonoBehaviour, IBase
{ {
private Rigidbody rb; [SerializeField] private DiceSideData[] diceSideDatas;
private bool rolling; [SerializeField] private Image diceImage;
[SerializeField] private Sprite defaultSprite;
[SerializeField] private DiceSide[] diceSides;
[SerializeField] private float sideValueTime = 1.2f;
[SerializeField] private Vector3 startPos = new Vector3(0, 20, 0);
[Header("Physics Randomness")]
[SerializeField] private float baseSpinForce = 900f;
[SerializeField] private float sideForce = 0.18f;
[SerializeField] private float liftForce = 0.1f;
private Animator animator;
private List<int> probabilityValues = new List<int>() { 3, 4, 5 }; private List<int> probabilityValues = new List<int>() { 3, 4, 5 };
private Quaternion startRotation;
private Action<int> onRollingComplete = null; private Action<int> onRollingComplete = null;
private IRollBase rollBase = null; private IRollBase rollBase = null;
private bool rolling;
private bool hasNoActionOnRoll = false; private bool hasNoActionOnRoll = false;
private int rolledVal = 0;
private void Awake() private void Awake()
{ {
rb = GetComponent<Rigidbody>(); animator = GetComponent<Animator>();
rb.useGravity = false; Debug.Log($"Dice roll test: StartRollingAction: animator: {animator}");
transform.localPosition = startPos;
startRotation = transform.localRotation;
} }
public void Roll(Action<int> onComplete, bool isBot) public void Roll(Action<int> onComplete, bool isBot)
@ -40,46 +52,20 @@ public class DiceView : MonoBehaviour, IBase
if (!rolling) if (!rolling)
{ {
Debug.Log($"isBot: {isBot}"); Debug.Log($"isBot: {isBot}");
animator.enabled = true;
onRollingComplete = onComplete; onRollingComplete = onComplete;
StartCoroutine(RollRoutine()); StartRollingAction();
} }
} }
private IEnumerator RollRoutine() private void StartRollingAction()
{ {
Debug.Log($"Dice roll test: StartRollingAction: animator: {animator}, {gameObject.name}");
rolling = true; rolling = true;
rolledVal = 0;
// start animation
animator.SetTrigger(Ludo_3D_Constants.RollDiceTriggerString);
// MICRO DELAY → breaks physics sync between dice
yield return new WaitForSeconds(Random.Range(0.01f, 0.06f));
rb.useGravity = true;
// PER-DICE FORCE MULTIPLIER
float spinMultiplier = Random.Range(0.8f, 1.25f);
// RANDOM TORQUE
rb.AddTorque(
Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
ForceMode.Impulse
);
// RANDOM SIDE FORCE
Vector3 sideDir = new Vector3(
Random.Range(-1f, 1f),
0f,
Random.Range(-1f, 1f)
).normalized;
rb.AddForce(sideDir * sideForce, ForceMode.Impulse);
// SMALL UPWARD FORCE
rb.AddForce(Vector3.up * liftForce, ForceMode.Impulse);
yield return new WaitForSeconds(sideValueTime);
int rolledVal = 0;
if (hasNoActionOnRoll) if (hasNoActionOnRoll)
{ {
if (rollBase.SixRollCount == 0) if (rollBase.SixRollCount == 0)
@ -88,22 +74,47 @@ public class DiceView : MonoBehaviour, IBase
} }
rollBase.UpdateSixRollCount(); rollBase.UpdateSixRollCount();
rolledVal = rollBase.SixRollCount == rollBase.MaxRollCount ? rolledVal = rollBase.SixRollCount == rollBase.MaxRollCount ? Ludo_3D_Constants.Max_Dice_Rolls : GetDiceValue();
Ludo_3D_Constants.Max_Dice_Rolls : GetDiceValue();
} }
else else
{ {
rolledVal = GetDiceValue(); rolledVal = GetDiceValue();
} }
}
/*
* Summary:
* Call when the dice roll animation is complete
*/
public void OnDiceRollingCompleted()
{
animator.ResetTrigger(Ludo_3D_Constants.RollDiceTriggerString);
Debug.Log($"Dice roll test: OnDiceRollingCompleted");
if (rolledVal == Ludo_3D_Constants.Max_Dice_Rolls) if (rolledVal == Ludo_3D_Constants.Max_Dice_Rolls)
ResetRollData(); ResetRollData();
ResetDice(); ResetData();
Debug.Log($"Dice rolled: {rolledVal}"); Debug.Log($"Dice roll test: Dice rolled: {rolledVal}");
onRollingComplete?.Invoke(rolledVal); onRollingComplete?.Invoke(rolledVal);
} }
public void OnReturnedToIdle()
{
Debug.Log($"Dice roll test: OnReturnedToIdle: rolled: {rolledVal}");
animator.enabled = false;
if (rolledVal == 0)
{
diceImage.sprite = defaultSprite;
Debug.Log($"Dice roll test: OnReturnedToIdle: setting default sprite");
}
else
{
diceImage.sprite = diceSideDatas[rolledVal - 1].sprite;
}
Debug.Log($"Dice roll test: OnReturnedToIdle: diceImage.sprite: {diceImage.sprite.name}");
}
private int GetDiceValue() private int GetDiceValue()
{ {
return Random.Range(1, Ludo_3D_Constants.Max_Dice_Rolls + 1); return Random.Range(1, Ludo_3D_Constants.Max_Dice_Rolls + 1);
@ -114,20 +125,15 @@ public class DiceView : MonoBehaviour, IBase
if (rollBase != null) rollBase.ResetRollData(); if (rollBase != null) rollBase.ResetRollData();
} }
public void ResetDice() public void ResetData()
{ {
rollBase = null; rollBase = null;
rb.useGravity = false;
rb.velocity = Vector3.zero;
rb.angularVelocity = Vector3.zero;
transform.localPosition = startPos;
rolling = false; rolling = false;
} }
public void ResetOnSessionEnd() public void ResetOnSessionEnd()
{ {
ResetDice(); ResetData();
transform.localRotation = startRotation;
onRollingComplete = null; onRollingComplete = null;
} }

View File

@ -33,10 +33,10 @@ RectTransform:
m_Father: {fileID: 1882416428171655664} m_Father: {fileID: 1882416428171655664}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0.4997177, y: -1.3315816}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: -50.9302, y: -55.2572}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8636401148931874773 --- !u!222 &8636401148931874773
CanvasRenderer: CanvasRenderer:
@ -89,6 +89,7 @@ GameObject:
- component: {fileID: 1882416428171655663} - component: {fileID: 1882416428171655663}
- component: {fileID: 1882416428171655661} - component: {fileID: 1882416428171655661}
- component: {fileID: 3198670228222659179} - component: {fileID: 3198670228222659179}
- component: {fileID: 4899113815169563360}
m_Layer: 5 m_Layer: 5
m_Name: Dice View m_Name: Dice View
m_TagString: Untagged m_TagString: Untagged
@ -103,10 +104,10 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1882416428171655665} m_GameObject: {fileID: 1882416428171655665}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 1
m_Children: m_Children:
- {fileID: 4547155689416384467} - {fileID: 4547155689416384467}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -220,3 +221,30 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1 m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0 m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0 m_WriteDefaultValuesOnDisable: 0
--- !u!114 &4899113815169563360
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1882416428171655665}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e700eca2e67354017b67213c95bbee09, type: 3}
m_Name:
m_EditorClassIdentifier:
diceSideDatas:
- sideVal: 0
sprite: {fileID: -1712661324, guid: bbe0ebcb7b6854733a0dd63492c4d57d, type: 3}
- sideVal: 1
sprite: {fileID: -446861723, guid: bbe0ebcb7b6854733a0dd63492c4d57d, type: 3}
- sideVal: 2
sprite: {fileID: -1704993586, guid: bbe0ebcb7b6854733a0dd63492c4d57d, type: 3}
- sideVal: 3
sprite: {fileID: -216994016, guid: bbe0ebcb7b6854733a0dd63492c4d57d, type: 3}
- sideVal: 4
sprite: {fileID: -1410956897, guid: bbe0ebcb7b6854733a0dd63492c4d57d, type: 3}
- sideVal: 5
sprite: {fileID: -387705599, guid: bbe0ebcb7b6854733a0dd63492c4d57d, type: 3}
diceImage: {fileID: 3592825875980183606}
defaultSprite: {fileID: 1572130339, guid: 2c0526d99bc3843a4b73e6eb2f3b1376, type: 3}

View File

@ -1700,7 +1700,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 953941043} - {fileID: 953941043}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 16 m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@ -1803,7 +1803,7 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 15 m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &114937259 --- !u!1001 &114937259
PrefabInstance: PrefabInstance:
@ -4126,7 +4126,7 @@ Transform:
- {fileID: 2046376691} - {fileID: 2046376691}
- {fileID: 1193188584} - {fileID: 1193188584}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 25 m_RootOrder: 24
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &403482847 --- !u!1 &403482847
GameObject: GameObject:
@ -4496,7 +4496,7 @@ Transform:
- {fileID: 987201644} - {fileID: 987201644}
- {fileID: 1251876827} - {fileID: 1251876827}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 23 m_RootOrder: 22
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &433034051 --- !u!114 &433034051
MonoBehaviour: MonoBehaviour:
@ -5912,7 +5912,7 @@ Transform:
m_Children: m_Children:
- {fileID: 777143461} - {fileID: 777143461}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 24 m_RootOrder: 23
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &591083575 --- !u!1 &591083575
GameObject: GameObject:
@ -6041,7 +6041,7 @@ Transform:
- {fileID: 1315025632} - {fileID: 1315025632}
- {fileID: 1396832879} - {fileID: 1396832879}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 20 m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &612889230 stripped --- !u!114 &612889230 stripped
MonoBehaviour: MonoBehaviour:
@ -9434,79 +9434,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8621343442563501343, guid: b9f6f4c66b5a34d7eb7286e772505389, type: 3} m_CorrespondingSourceObject: {fileID: 8621343442563501343, guid: b9f6f4c66b5a34d7eb7286e772505389, type: 3}
m_PrefabInstance: {fileID: 943340717} m_PrefabInstance: {fileID: 943340717}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &946406020
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 946406042}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 8400000, guid: 645ad19e4968349889a60157fc13f356, type: 2}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!222 &946406021
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 946406042}
m_CullTransparentMesh: 1
--- !u!1 &946406042
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 946406043}
- component: {fileID: 946406021}
- component: {fileID: 946406020}
m_Layer: 5
m_Name: Dice
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &946406043
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 946406042}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1100918555}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -0.00018310547}
m_SizeDelta: {x: 175, y: 175}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &948796889 --- !u!1 &948796889
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10389,7 +10316,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2840576771603088635, guid: da37421badcbd4576a24a3ab7b36ecd9, type: 3} - target: {fileID: 2840576771603088635, guid: da37421badcbd4576a24a3ab7b36ecd9, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 21 value: 20
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2840576771603088635, guid: da37421badcbd4576a24a3ab7b36ecd9, type: 3} - target: {fileID: 2840576771603088635, guid: da37421badcbd4576a24a3ab7b36ecd9, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -11560,7 +11487,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f06aabb5d8a9f441e99482ccf020f10c, type: 3} m_Script: {fileID: 11500000, guid: f06aabb5d8a9f441e99482ccf020f10c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
diceView: {fileID: 1619592888} diceView: {fileID: 1763545633}
diceTestValue: 0 diceTestValue: 0
--- !u!4 &1039618837 stripped --- !u!4 &1039618837 stripped
Transform: Transform:
@ -12062,128 +11989,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7767047851774264951, guid: b90e5cd95dff44f94b9151a2e535a0f8, type: 3} m_CorrespondingSourceObject: {fileID: 7767047851774264951, guid: b90e5cd95dff44f94b9151a2e535a0f8, type: 3}
m_PrefabInstance: {fileID: 72751001} m_PrefabInstance: {fileID: 72751001}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &1100918532
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1100918554}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 58e0f18b9561a4018b66e3973548335b, type: 3}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1100918533
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1100918554}
m_CullTransparentMesh: 1
--- !u!114 &1100918534
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1100918554}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1100918532}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1100918554
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1100918555}
- component: {fileID: 1100918533}
- component: {fileID: 1100918532}
- component: {fileID: 1100918534}
m_Layer: 5
m_Name: Dice View
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1100918555
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1100918554}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 946406043}
m_Father: {fileID: 5608193482405246780}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 100, y: -100}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1101942514 --- !u!1 &1101942514
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -12876,7 +12681,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 692350080486519524, guid: a8e3aa2657cf941969f210f066c2be8c, type: 3} - target: {fileID: 692350080486519524, guid: a8e3aa2657cf941969f210f066c2be8c, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 13 value: 12
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 692350080486519524, guid: a8e3aa2657cf941969f210f066c2be8c, type: 3} - target: {fileID: 692350080486519524, guid: a8e3aa2657cf941969f210f066c2be8c, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -14577,7 +14382,7 @@ MonoBehaviour:
- {fileID: 1107252688} - {fileID: 1107252688}
- {fileID: 1406544794} - {fileID: 1406544794}
- {fileID: 884011400} - {fileID: 884011400}
enableLogs: 0 enableLogs: 1
--- !u!4 &1335794571 --- !u!4 &1335794571
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -16495,74 +16300,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1617936235} m_GameObject: {fileID: 1617936235}
m_Mesh: {fileID: 4300004, guid: 25e0b84f10949354b96b98b3742acdde, type: 3} m_Mesh: {fileID: 4300004, guid: 25e0b84f10949354b96b98b3742acdde, type: 3}
--- !u!1001 &1619592885
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5543862162727244198, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_Name
value: Dice Prefab
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_RootOrder
value: 12
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalPosition.x
value: -118.30057
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalPosition.z
value: -126.852264
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5543862162727244199, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
--- !u!114 &1619592888 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6189687753030591808, guid: ac6c492cc5bc64ab58060047f5198136, type: 3}
m_PrefabInstance: {fileID: 1619592885}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e700eca2e67354017b67213c95bbee09, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1632771714 --- !u!1 &1632771714
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -17853,6 +17590,119 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b90e5cd95dff44f94b9151a2e535a0f8, type: 3} m_SourcePrefab: {fileID: 100100000, guid: b90e5cd95dff44f94b9151a2e535a0f8, type: 3}
--- !u!1001 &1763545631
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 5608193482405246780}
m_Modifications:
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_SizeDelta.x
value: 120
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_SizeDelta.y
value: 120
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_AnchoredPosition.x
value: 100
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_AnchoredPosition.y
value: -100
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1882416428171655665, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
propertyPath: m_Name
value: Dice View
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
--- !u!224 &1763545632 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1882416428171655664, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
m_PrefabInstance: {fileID: 1763545631}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1763545633 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4899113815169563360, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
m_PrefabInstance: {fileID: 1763545631}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e700eca2e67354017b67213c95bbee09, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1765638126 --- !u!1001 &1765638126
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -18874,7 +18724,7 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 22 m_RootOrder: 21
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1887957727 --- !u!1 &1887957727
GameObject: GameObject:
@ -18925,7 +18775,7 @@ Transform:
- {fileID: 1545603097} - {fileID: 1545603097}
- {fileID: 7686822008443127058} - {fileID: 7686822008443127058}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 18 m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1899106373 --- !u!1 &1899106373
GameObject: GameObject:
@ -19320,7 +19170,7 @@ Transform:
- {fileID: 75716810} - {fileID: 75716810}
- {fileID: 1711642273} - {fileID: 1711642273}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 19 m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1947447607 stripped --- !u!114 &1947447607 stripped
MonoBehaviour: MonoBehaviour:
@ -20898,8 +20748,19 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 17 m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2076464264 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1882416428171655661, guid: 94fc731c540da43c9ab09386da3501df, type: 3}
m_PrefabInstance: {fileID: 1763545631}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &2076908155 --- !u!1001 &2076908155
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -22075,7 +21936,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1003433482227882326, guid: f7fae8d587c2e4afcbcd76b417afc521, type: 3} - target: {fileID: 1003433482227882326, guid: f7fae8d587c2e4afcbcd76b417afc521, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 14 value: 13
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1003433482227882326, guid: f7fae8d587c2e4afcbcd76b417afc521, type: 3} - target: {fileID: 1003433482227882326, guid: f7fae8d587c2e4afcbcd76b417afc521, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -24696,7 +24557,7 @@ RectTransform:
- {fileID: 5608193482794695410} - {fileID: 5608193482794695410}
- {fileID: 5608193482610168847} - {fileID: 5608193482610168847}
- {fileID: 5608193483164820607} - {fileID: 5608193483164820607}
- {fileID: 1100918555} - {fileID: 1763545632}
m_Father: {fileID: 5608193482973815123} m_Father: {fileID: 5608193482973815123}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -24736,7 +24597,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
screenType: 5 screenType: 5
shouldFade: 0 shouldFade: 0
diceBtn: {fileID: 1100918534} diceBtn: {fileID: 2076464264}
pauseBtn: {fileID: 5608193482794695415} pauseBtn: {fileID: 5608193482794695415}
diceCountText: {fileID: 5608193483164820606} diceCountText: {fileID: 5608193483164820606}
playerTurnText: {fileID: 5608193482610168846} playerTurnText: {fileID: 5608193482610168846}

View File

@ -10,4 +10,6 @@ public static class Ludo_3D_Constants
public const string Player2_Name = "Player2"; public const string Player2_Name = "Player2";
public const string Player3_Name = "Player3"; public const string Player3_Name = "Player3";
public const string Player4_Name = "Player4"; public const string Player4_Name = "Player4";
public const string RollDiceTriggerString = "RollDice";
} }