From 8fcd9e89dc18605864e95fc472e0318a8b51fa63 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 26 Jan 2023 12:04:33 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A5ttf=C3=A4lla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Råttfälla + animation vid touch --- Assets/AnimatorsAnims/Råttfälla.controller | 133 ++++++ .../Råttfälla.controller.meta | 8 + Assets/AnimatorsAnims/Snap.anim | 80 ++++ Assets/AnimatorsAnims/Snap.anim.meta | 8 + Assets/Materials/Grapic/Rat Trap.png | Bin 0 -> 801 bytes Assets/Materials/Grapic/Rat Trap.png.meta | 277 ++++++++++++ Assets/Scenes/Main_Game.unity | 154 ++++++- Assets/Scripts/RatTrap.cs | 20 + Assets/Scripts/RatTrap.cs.meta | 11 + .../Layouts/CurrentMaximizeLayout.dwlt | 417 +++++++++--------- 10 files changed, 904 insertions(+), 204 deletions(-) create mode 100644 Assets/AnimatorsAnims/Råttfälla.controller create mode 100644 Assets/AnimatorsAnims/Råttfälla.controller.meta create mode 100644 Assets/AnimatorsAnims/Snap.anim create mode 100644 Assets/AnimatorsAnims/Snap.anim.meta create mode 100644 Assets/Materials/Grapic/Rat Trap.png create mode 100644 Assets/Materials/Grapic/Rat Trap.png.meta create mode 100644 Assets/Scripts/RatTrap.cs create mode 100644 Assets/Scripts/RatTrap.cs.meta diff --git a/Assets/AnimatorsAnims/Råttfälla.controller b/Assets/AnimatorsAnims/Råttfälla.controller new file mode 100644 index 0000000..048f062 --- /dev/null +++ b/Assets/AnimatorsAnims/Råttfälla.controller @@ -0,0 +1,133 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-8548847687808218703 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: New State + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 7863456763766558630} + 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!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: "R\xE5ttf\xE4lla" + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: Snap + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 103221287831212599} + 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!1107 &103221287831212599 +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: 672606753263963817} + m_Position: {x: 480, y: 110, z: 0} + - serializedVersion: 1 + m_State: {fileID: -8548847687808218703} + m_Position: {x: 374.8426, y: -16.642014, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -8548847687808218703} +--- !u!1102 &672606753263963817 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Snap + 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: 851c9e2d9f3978c4db0db0defd68e879, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1101 &7863456763766558630 +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: Snap + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 672606753263963817} + 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: 0 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 diff --git a/Assets/AnimatorsAnims/Råttfälla.controller.meta b/Assets/AnimatorsAnims/Råttfälla.controller.meta new file mode 100644 index 0000000..c1fc74f --- /dev/null +++ b/Assets/AnimatorsAnims/Råttfälla.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2dce173fef6995a458463a1e28ddf27e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnimatorsAnims/Snap.anim b/Assets/AnimatorsAnims/Snap.anim new file mode 100644 index 0000000..9d78acc --- /dev/null +++ b/Assets/AnimatorsAnims/Snap.anim @@ -0,0 +1,80 @@ +%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: Snap + 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: + - curve: + - time: 0 + value: {fileID: -601158951, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - time: 0.05 + value: {fileID: -289541166, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - time: 0.1 + value: {fileID: 1903543565, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - time: 0.15 + value: {fileID: -1744080450, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - time: 0.2 + value: {fileID: 717766898, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 20 + 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: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: -601158951, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - {fileID: -289541166, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - {fileID: 1903543565, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - {fileID: -1744080450, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + - {fileID: 717766898, guid: 20f76c6c1cf2a514bb0385ca7afe8af3, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.25 + 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: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/AnimatorsAnims/Snap.anim.meta b/Assets/AnimatorsAnims/Snap.anim.meta new file mode 100644 index 0000000..30ef61b --- /dev/null +++ b/Assets/AnimatorsAnims/Snap.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 851c9e2d9f3978c4db0db0defd68e879 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Grapic/Rat Trap.png b/Assets/Materials/Grapic/Rat Trap.png new file mode 100644 index 0000000000000000000000000000000000000000..6fd5466e37ede4a3ed1716eb8ca067c50d854487 GIT binary patch literal 801 zcmeAS@N?(olHy`uVBq!ia0y~yU_1b1J8-Z8$=*lH<$)Aqage(c!@6@aFBuq^ZhN{o zhE&XXd)F~0)oO=p|d zsVzETmf&#M;Qsb5!D-Kr9(doLD8mFanOY#YB=&l26%RwZKynT54$X((1e zHn@NL4)X(vAPzI%%S%#Yub2Kk{(PFOBiF%gx%;2WaT}a{$mjCp@_QC%j)l3mwGQb^ zmNgv``1W=KyYi=3?TNRyoxONCe}#NolfVKe!((|jB(JF)t9Wni)X>H0qlDsyX3s& z%SY#zbC`5PUOwDD<->{RPk*j^mD~SVpn+BTUPjz(+k5fTmsMKdD#@=k-|iopUoO+W z@&ec5&$s=bfB#f-{q7w**?(&PL(<v^{% zz3ww^TUBqd^hUu?!B_i5nw~EcIUV@l;KwtY??DVlB;>#E`MW+c`_g{ZXR{2q=H8xC zVz%TPKSTA}`l$?mem<@hcjB0Dw~t#fW;^qgZ*AXl1OM-Q@Vb&i(MC_^msZ%S|NGzN z<>;Ng!+xL+7!9ATrd|2^b^6?*DGW1$9DGo?q9CnI-RMDagFL<)10* zTU7(|RsR#8q^6hiMMtju7rB3#!SgRK!=B}Ao?iAV`_&ESzxVgooTw7`_vh>Ry!-z( z(@T$CldXPx=Y9RluloO