damianNonsense #4
@@ -79,7 +79,7 @@ AnimationClip:
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
|
||||
@@ -79,7 +79,7 @@ AnimationClip:
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
|
||||
@@ -52,7 +52,7 @@ AnimatorStateMachine:
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_EntryPosition: {x: 80, y: 130, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 1953973717063047684}
|
||||
@@ -64,7 +64,7 @@ AnimatorState:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ANIM_Gardener_Scared
|
||||
m_Speed: 1
|
||||
m_Speed: 0.5
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 2668893367386582248}
|
||||
@@ -92,7 +92,7 @@ AnimatorState:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ANIM_Gardener_Chase
|
||||
m_Speed: 1
|
||||
m_Speed: 0.5
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -2076711753281386268}
|
||||
@@ -191,11 +191,11 @@ AnimatorStateTransition:
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75409836
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 0
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,169 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e07c2b448e92b740aa0cedeaec6b17b
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -6472171441532308910
|
||||
second: HornOnPLACEHOLDER_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: HornOnPLACEHOLDER_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 6
|
||||
y: 52
|
||||
width: 218
|
||||
height: 135
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 252f90e6d5a3e26a0800000000000000
|
||||
internalID: -6472171441532308910
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
HornOnPLACEHOLDER_0: -6472171441532308910
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -1,10 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e6d5c9e1ab5664428bd966573578533
|
||||
guid: c5858285e4dccc040b7e7c1f7386cb9e
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 385901794228357913
|
||||
second: HornPLACEHOLDER_0
|
||||
213: -7985933250357003947
|
||||
second: HornPLACEHOLDER 1_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
@@ -126,13 +126,13 @@ TextureImporter:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: HornPLACEHOLDER_0
|
||||
name: HornPLACEHOLDER 1_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 7
|
||||
y: 34
|
||||
width: 213
|
||||
height: 167
|
||||
x: 17
|
||||
y: 47
|
||||
width: 197
|
||||
height: 113
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -141,8 +141,8 @@ TextureImporter:
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 91bca2323affa5500800000000000000
|
||||
internalID: 385901794228357913
|
||||
spriteID: 5597d7425044c2190800000000000000
|
||||
internalID: -7985933250357003947
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
@@ -161,7 +161,7 @@ TextureImporter:
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
HornPLACEHOLDER_0: 385901794228357913
|
||||
HornPLACEHOLDER 1_0: -7985933250357003947
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
|
||||
@@ -150,7 +150,7 @@ TextureImporter:
|
||||
x: 24
|
||||
y: 13
|
||||
width: 569
|
||||
height: 380
|
||||
height: 384
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -169,12 +169,12 @@ TextureImporter:
|
||||
name: LawnMowerMovingPLACEHOLDER_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 415
|
||||
x: 416
|
||||
y: 7
|
||||
width: 16
|
||||
width: 14
|
||||
height: 20
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -193,8 +193,8 @@ TextureImporter:
|
||||
serializedVersion: 2
|
||||
x: 632
|
||||
y: 13
|
||||
width: 569
|
||||
height: 380
|
||||
width: 570
|
||||
height: 384
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -214,11 +214,11 @@ TextureImporter:
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1013
|
||||
y: 12
|
||||
y: 11
|
||||
width: 24
|
||||
height: 24
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
height: 26
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -235,10 +235,10 @@ TextureImporter:
|
||||
name: LawnMowerMovingPLACEHOLDER_4
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1239
|
||||
x: 1238
|
||||
y: 13
|
||||
width: 569
|
||||
height: 380
|
||||
width: 575
|
||||
height: 384
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -258,9 +258,9 @@ TextureImporter:
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1861
|
||||
y: 12
|
||||
width: 569
|
||||
height: 380
|
||||
y: 11
|
||||
width: 568
|
||||
height: 386
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -279,12 +279,12 @@ TextureImporter:
|
||||
name: LawnMowerMovingPLACEHOLDER_6
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2242
|
||||
y: 11
|
||||
x: 2243
|
||||
y: 10
|
||||
width: 24
|
||||
height: 24
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
height: 26
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -309,7 +309,9 @@ TextureImporter:
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
entries:
|
||||
- key: SpriteEditor.SliceSettings
|
||||
value: '{"sliceOnImport":false,"gridCellCount":{"x":1.0,"y":1.0},"gridSpriteSize":{"x":100.0,"y":100.0},"gridSpriteOffset":{"x":0.0,"y":0.0},"gridSpritePadding":{"x":0.0,"y":0.0},"pivot":{"x":0.5,"y":0.20000000298023225},"autoSlicingMethod":0,"spriteAlignment":9,"slicingType":0,"keepEmptyRects":false,"isAlternate":false}'
|
||||
nameFileIdTable:
|
||||
LawnMowerMovingPLACEHOLDER_0: -4444670910754578914
|
||||
LawnMowerMovingPLACEHOLDER_1: 6348190279078284696
|
||||
|
||||
@@ -16,5 +16,4 @@ MonoBehaviour:
|
||||
displayName: Start Lawnmower
|
||||
description: Start up the lawnmower so the Gardener runs after it.
|
||||
icon: {fileID: 0}
|
||||
unlocks:
|
||||
- {fileID: 11400000, guid: f9da68caaae2a244885a13cf2e2e45c0, type: 2}
|
||||
unlocks: []
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Pixelplacement
|
||||
/// <summary>
|
||||
/// Moves a Transform along a spline path from a start percentage to an end percentage.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Spline(Spline spline, Transform target, float startPercentage, float endPercentage, bool faceDirection, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
public static TweenSystem.TweenBase Spline(Spline spline, Transform target, float startPercentage, float endPercentage, bool faceDirection, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true, Action onComplete = null, Action onUpdate = null)
|
||||
{
|
||||
TweenSystem.SplinePercentage tween = new TweenSystem.SplinePercentage(spline, target, startPercentage, endPercentage, faceDirection, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
|
||||
@@ -96,7 +96,6 @@ GameObject:
|
||||
- component: {fileID: 7695719922005140445}
|
||||
- component: {fileID: 4901186366144297979}
|
||||
- component: {fileID: 5264516637087018658}
|
||||
- component: {fileID: 8801225172547510663}
|
||||
m_Layer: 10
|
||||
m_Name: Lawnmower
|
||||
m_TagString: Untagged
|
||||
@@ -233,6 +232,21 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 73d6494a73174ffabc6a7d3089d51e73, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isOneTime: 0
|
||||
cooldown: -1
|
||||
characterToInteract: 1
|
||||
interactionStarted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
interactionInterrupted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
characterArrived:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
interactionComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &5264516637087018658
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -246,15 +260,3 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
stepData: {fileID: 11400000, guid: ea383d1dee861f54c9a1d4f32a2f6afc, type: 2}
|
||||
--- !u!114 &8801225172547510663
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4940025602237181209}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 833a4ccef651449e973e623d9107bef5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
||||
@@ -13,6 +13,7 @@ MonoBehaviour:
|
||||
m_Name: DefaultSettings
|
||||
m_EditorClassIdentifier:
|
||||
playerStopDistance: 10
|
||||
playerStopDistanceDirectInteraction: 2
|
||||
followerPickupDelay: 0.2
|
||||
followDistance: 5
|
||||
manualMoveSmooth: 2
|
||||
@@ -20,7 +21,7 @@ MonoBehaviour:
|
||||
thresholdNear: 7
|
||||
stopThreshold: 0.5
|
||||
moveSpeed: 25
|
||||
stopDistance: 0.1
|
||||
stopDistance: 2
|
||||
useRigidbody: 1
|
||||
defaultHoldMovementMode: 1
|
||||
followUpdateInterval: 0.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using Pixelplacement;
|
||||
using Pixelplacement.TweenSystem;
|
||||
|
||||
public class GardenerChaseBehavior : MonoBehaviour
|
||||
{
|
||||
@@ -7,10 +8,30 @@ public class GardenerChaseBehavior : MonoBehaviour
|
||||
public Transform GardenerObject;
|
||||
public float chaseDuration;
|
||||
public float chaseDelay;
|
||||
[SerializeField] private Animator animator;
|
||||
[SerializeField] public GameObject lawnMowerRef;
|
||||
private TweenBase tweenRef;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
Tween.Spline (ChaseSpline, GardenerObject, 0, 1, false, chaseDuration, chaseDelay, Tween.EaseInOut, Tween.LoopType.PingPong);
|
||||
tweenRef = Tween.Spline (ChaseSpline, GardenerObject, 0, 1, false, chaseDuration, chaseDelay, Tween.EaseLinear, Tween.LoopType.None, HandleTweenStarted, HandleTweenFinished);
|
||||
}
|
||||
|
||||
void HandleTweenFinished ()
|
||||
{
|
||||
|
||||
//Debug.Log ("Tween finished!");
|
||||
tweenRef.Stop();
|
||||
Destroy(ChaseSpline);
|
||||
var gardenerSpriteRef = gameObject.transform.Find("GardenerRunningSprite");
|
||||
gardenerSpriteRef.transform.SetParent(lawnMowerRef.transform, true);
|
||||
|
||||
|
||||
}
|
||||
void HandleTweenStarted ()
|
||||
{
|
||||
//Debug.Log ("Tween started!");
|
||||
animator.SetBool("IsIdle?", false);
|
||||
}
|
||||
|
||||
void Awake()
|
||||
@@ -23,4 +44,7 @@ public class GardenerChaseBehavior : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
8
Assets/Scripts/DamianExperiments/Animations.meta
Normal file
8
Assets/Scripts/DamianExperiments/Animations.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6fd0683cee159c4f899a794af80c7ce
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,84 @@
|
||||
%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: LawnMowerMowing
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves:
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
- time: 0
|
||||
value: {fileID: -4444670910754578914, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- time: 0.18333334
|
||||
value: {fileID: 5233908553689211412, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- time: 0.33333334
|
||||
value: {fileID: 7052581180763600252, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- time: 0.48333332
|
||||
value: {fileID: 4839952163610979709, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- time: 0.6666667
|
||||
value: {fileID: -4444670910754578914, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
attribute: m_Sprite
|
||||
path:
|
||||
classID: 212
|
||||
script: {fileID: 0}
|
||||
flags: 2
|
||||
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: 0
|
||||
script: {fileID: 0}
|
||||
typeID: 212
|
||||
customType: 23
|
||||
isPPtrCurve: 1
|
||||
isIntCurve: 0
|
||||
isSerializeReferenceCurve: 0
|
||||
pptrCurveMapping:
|
||||
- {fileID: -4444670910754578914, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- {fileID: 5233908553689211412, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- {fileID: 7052581180763600252, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- {fileID: 4839952163610979709, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
- {fileID: -4444670910754578914, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.68333334
|
||||
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: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 083a3166fef9168469713bd00eee5308
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1102 &-9094513822423650161
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: LawnMowerMowing
|
||||
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: 083a3166fef9168469713bd00eee5308, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &-2429364330681070164
|
||||
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: -9094513822423650161}
|
||||
m_Position: {x: 30, y: 240, 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: -9094513822423650161}
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: _Lawnmower_Anim
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: -2429364330681070164}
|
||||
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}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be48400cf83222c49ba9d7b34ab1d9e4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ad6e1dc7d83d164ca43792751384223
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,18 +0,0 @@
|
||||
using UnityEngine;
|
||||
using Pixelplacement;
|
||||
|
||||
|
||||
public class GardenerBehaviour : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/DamianExperiments/LawnMowerPuzzle.meta
Normal file
8
Assets/Scripts/DamianExperiments/LawnMowerPuzzle.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84222101ff72f434b8e5e49754305f5d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Pixelplacement;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
public class GardenerBehaviour : MonoBehaviour
|
||||
{
|
||||
private StateMachine stateMachineRef;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
stateMachineRef = GetComponent<StateMachine>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void stateSwitch (string StateName)
|
||||
{
|
||||
Debug.Log("State Switch to: " + StateName);
|
||||
stateMachineRef.ChangeState(StateName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
using Pixelplacement;
|
||||
|
||||
public class LawnMowerBehaviour : MonoBehaviour
|
||||
{
|
||||
private StateMachine stateMachineRef;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
stateMachineRef = GetComponent<StateMachine>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
public void mowerTouched()
|
||||
{
|
||||
Debug.Log("Mower Touched");
|
||||
}
|
||||
|
||||
public void stateSwitch(string StateName)
|
||||
{
|
||||
Debug.Log("State Switch to: " + StateName);
|
||||
stateMachineRef.ChangeState(StateName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fba2c868971b20439aaea06a939d8e7
|
||||
@@ -0,0 +1,152 @@
|
||||
using UnityEngine;
|
||||
using Pixelplacement;
|
||||
|
||||
public class LawnMowerChaseBehaviour : MonoBehaviour
|
||||
{
|
||||
public Spline ChaseSpline;
|
||||
public Transform LawnMowerObject;
|
||||
public float chaseDuration;
|
||||
public float chaseDelay;
|
||||
[Range(0, 1)] public float startPercentage; // Exposed in Inspector
|
||||
|
||||
private const float AnchorThreshold = 0.05f;
|
||||
private bool _wasAtStart = false;
|
||||
private bool _wasAtEnd = false;
|
||||
|
||||
// For initial tween tracking
|
||||
private bool _initialTweenActive = true;
|
||||
private float _initialTargetAnchor = 1f;
|
||||
|
||||
//Reference to the gardener's gameobject
|
||||
public GameObject gardenerRef = null;
|
||||
public Animator gardenerAnimator = null;
|
||||
public bool gardenerChasing = true;
|
||||
|
||||
void Start()
|
||||
{
|
||||
LawnMowerObject.position = ChaseSpline.GetPosition(startPercentage);
|
||||
|
||||
float distanceToStart = Mathf.Abs(startPercentage - 0f);
|
||||
float distanceToEnd = Mathf.Abs(startPercentage - 1f);
|
||||
|
||||
if (distanceToStart < distanceToEnd)
|
||||
{
|
||||
// Tween from startPercentage to 1
|
||||
_initialTargetAnchor = 1f;
|
||||
Tween.Spline(
|
||||
ChaseSpline,
|
||||
LawnMowerObject,
|
||||
startPercentage,
|
||||
1,
|
||||
false,
|
||||
chaseDuration * (1 - startPercentage),
|
||||
chaseDelay,
|
||||
Tween.EaseInOut,
|
||||
Tween.LoopType.None
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Tween from startPercentage to 0
|
||||
_initialTargetAnchor = 0f;
|
||||
Tween.Spline(
|
||||
ChaseSpline,
|
||||
LawnMowerObject,
|
||||
startPercentage,
|
||||
0,
|
||||
false,
|
||||
chaseDuration * startPercentage,
|
||||
chaseDelay,
|
||||
Tween.EaseInOut,
|
||||
Tween.LoopType.None
|
||||
);
|
||||
}
|
||||
_initialTweenActive = true;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
float percentage = ChaseSpline.ClosestPoint(LawnMowerObject.position);
|
||||
|
||||
// Handle initial tween completion
|
||||
if (_initialTweenActive)
|
||||
{
|
||||
if (Mathf.Abs(percentage - _initialTargetAnchor) <= AnchorThreshold)
|
||||
{
|
||||
// Start ping-pong tween between extremes
|
||||
StartPingPongTween(_initialTargetAnchor, 1f - _initialTargetAnchor);
|
||||
_initialTweenActive = false;
|
||||
}
|
||||
return; // Don't process flip logic until ping-pong starts
|
||||
}
|
||||
|
||||
// Detect start anchor
|
||||
if (percentage <= AnchorThreshold)
|
||||
{
|
||||
if (!_wasAtStart)
|
||||
{
|
||||
flipSprite();
|
||||
_wasAtStart = true;
|
||||
_wasAtEnd = false;
|
||||
}
|
||||
}
|
||||
// Detect end anchor
|
||||
else if (percentage >= 1f - AnchorThreshold)
|
||||
{
|
||||
if (!_wasAtEnd)
|
||||
{
|
||||
flipSprite();
|
||||
_wasAtEnd = true;
|
||||
_wasAtStart = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_wasAtStart = false;
|
||||
_wasAtEnd = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void StartPingPongTween(float from, float to)
|
||||
{
|
||||
Tween.Spline(
|
||||
ChaseSpline,
|
||||
LawnMowerObject,
|
||||
from,
|
||||
to,
|
||||
false,
|
||||
chaseDuration,
|
||||
0,
|
||||
Tween.EaseInOut,
|
||||
Tween.LoopType.PingPong
|
||||
);
|
||||
}
|
||||
|
||||
private void flipSprite()
|
||||
{
|
||||
if (gardenerRef == null)
|
||||
{
|
||||
gardenerRef = GameObject.Find("GardenerRunningSprite");
|
||||
gardenerAnimator = gardenerRef.GetComponent<Animator>();
|
||||
}
|
||||
|
||||
Vector3 scale = LawnMowerObject.transform.localScale;
|
||||
Vector3 rotation = LawnMowerObject.transform.eulerAngles;
|
||||
scale.x *= -1;
|
||||
rotation.z *= -1;
|
||||
LawnMowerObject.transform.localScale = scale;
|
||||
LawnMowerObject.transform.eulerAngles = rotation;
|
||||
if (gardenerChasing == true)
|
||||
{
|
||||
gardenerRef.transform.localPosition = new Vector3(-6.3f, -2.9f, gardenerRef.transform.localPosition.z);
|
||||
gardenerAnimator.SetBool("IsScared?", true);
|
||||
gardenerChasing = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
gardenerRef.transform.localPosition = new Vector3(8.3f, 3.9f, gardenerRef.transform.localPosition.z);
|
||||
gardenerAnimator.SetBool("IsScared?", false);
|
||||
gardenerChasing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 426d4511f8eb64747ab44f61973dcf2e
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fda7fccaa5fbd04695f4c98d29bcbe0
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa5b9c4244ad68a459d1b0dedfae767a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b3e10c6b8bba8b4483e5fa18d9fdb77
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Scripts/DamianExperiments/SoundBirdPuzzleSection/Honk.mp3
Normal file
BIN
Assets/Scripts/DamianExperiments/SoundBirdPuzzleSection/Honk.mp3
Normal file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 975d8d57c80dbbd478eff9545f015f8f
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,53 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SoundGenerator : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Sprite enterSprite;
|
||||
[SerializeField] private Sprite exitSprite;
|
||||
[SerializeField] private AudioClip enterSound;
|
||||
[SerializeField] private AudioSource audioSource;
|
||||
|
||||
private bool playerInside = false;
|
||||
private SpriteRenderer spriteRenderer;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
if (spriteRenderer != null && exitSprite != null)
|
||||
{
|
||||
spriteRenderer.sprite = exitSprite; // Set to default on start
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (!playerInside && other.CompareTag("Player"))
|
||||
{
|
||||
playerInside = true;
|
||||
Debug.Log("Player entered SoundGenerator trigger!");
|
||||
if (spriteRenderer != null && enterSprite != null)
|
||||
{
|
||||
spriteRenderer.sprite = enterSprite;
|
||||
}
|
||||
if (audioSource != null && enterSound != null)
|
||||
{
|
||||
audioSource.PlayOneShot(enterSound);
|
||||
}
|
||||
// Play sound and change animation/state here if needed
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
if (playerInside && other.CompareTag("Player"))
|
||||
{
|
||||
playerInside = false;
|
||||
Debug.Log("Player exited SoundGenerator trigger!");
|
||||
if (spriteRenderer != null && exitSprite != null)
|
||||
{
|
||||
spriteRenderer.sprite = exitSprite;
|
||||
}
|
||||
// Reset animation/state here if needed
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81336c2157cce7e46ab6ed093c7070c9
|
||||
@@ -184,6 +184,8 @@ public class PuzzleManager : MonoBehaviour
|
||||
/// </summary>
|
||||
public bool IsStepUnlocked(PuzzleStepSO step)
|
||||
{
|
||||
BuildRuntimeDependencies();
|
||||
UnlockInitialSteps();
|
||||
return unlockedSteps.Contains(step);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user