Skip to content

Commit

Permalink
#3 #8 Clone footsteps
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisas committed Mar 22, 2017
1 parent 8eda7e2 commit 39db522
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 52 deletions.
4 changes: 2 additions & 2 deletions Assets/PATimeRefactor/Assets/Scripts/TimeManagerDependable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ void Update()
{
m_ParadoxFOVTimer = Mathf.Clamp(m_ParadoxFOVTimer -= Time.deltaTime, 0, m_InitFOV);
m_Camera.fieldOfView = Mathf.Lerp(m_InitFOV * m_ParadoxFOVMultiplier, m_InitFOV, m_ParadoxFOVTimer / m_ParadoxFOVInterval);
Debug.Log(m_InitFOV * m_ParadoxFOVMultiplier);
Debug.Log(m_Camera.fieldOfView);
//Debug.Log(m_InitFOV * m_ParadoxFOVMultiplier);
//Debug.Log(m_Camera.fieldOfView);
}
break;
case RequiredAction.ParadoxOff:
Expand Down
4 changes: 2 additions & 2 deletions Assets/Prefabs/Ground Characters/Puppy/Puppy Gizmo.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ Transform:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1063806573325964}
m_LocalRotation: {x: -0.3521753, y: -0.62304157, z: 0.6317084, w: 0.2978863}
m_LocalRotation: {x: -0.35217533, y: -0.6230416, z: 0.63170844, w: 0.29788634}
m_LocalPosition: {x: 0.0000000063329932, y: 0.0041280463, z: -2.2351741e-10}
m_LocalScale: {x: 1, y: 0.9999999, z: 1.0000001}
m_Children:
Expand Down Expand Up @@ -2488,7 +2488,6 @@ MonoBehaviour:
tailChaseSpeed: 0.5
sitSpeed: 1
sittingTailWagSpeed: 1
m_MovementAudiosource: {fileID: 82521455723738612}
--- !u!114 &114771153228054198
MonoBehaviour:
m_ObjectHideFlags: 1
Expand All @@ -2503,6 +2502,7 @@ MonoBehaviour:
m_TailChase: {fileID: 8300000, guid: 616af324f4b0c9a48aac5de3ca563a4e, type: 3}
m_Paw: {fileID: 8300000, guid: e69dcc7327d66dc40bff9c63f348b257, type: 3}
m_Bark: {fileID: 8300000, guid: a599c6c53cd2e5d4eab8e4df150cefa2, type: 3}
m_MovementAudiosource: {fileID: 82521455723738612}
--- !u!135 &135520360206607512
SphereCollider:
m_ObjectHideFlags: 1
Expand Down
67 changes: 56 additions & 11 deletions Assets/Prefabs/Ground Characters/Test Dog Clone.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ GameObject:
m_Component:
- component: {fileID: 4274832022762586}
- component: {fileID: 54726893292461770}
- component: {fileID: 82988502466345010}
- component: {fileID: 136488809996048714}
- component: {fileID: 195579264184893958}
- component: {fileID: 114171912868847632}
- component: {fileID: 114860986800652246}
- component: {fileID: 114186232137434874}
- component: {fileID: 135790850364958870}
- component: {fileID: 114253224428243426}
m_Layer: 19
m_Name: Test Dog Clone
m_TagString: Clone
Expand Down Expand Up @@ -996,6 +996,22 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1937665238162648
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4615298118314180}
- component: {fileID: 82289300839046882}
m_Layer: 14
m_Name: Movement Audiosource
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1942045770265152
GameObject:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -1213,7 +1229,7 @@ Transform:
m_LocalScale: {x: 0.35, y: 0.001, z: 0.35}
m_Children: []
m_Father: {fileID: 4274832022762586}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4112497996104168
Transform:
Expand Down Expand Up @@ -1299,6 +1315,7 @@ Transform:
m_LocalPosition: {x: -1.3476725, y: 0.5, z: -20.058386}
m_LocalScale: {x: 10, y: 10, z: 10}
m_Children:
- {fileID: 4615298118314180}
- {fileID: 224999301382265924}
- {fileID: 4447256945343126}
- {fileID: 4629194356278368}
Expand Down Expand Up @@ -1444,7 +1461,7 @@ Transform:
- {fileID: 4382317068342856}
- {fileID: 4531938699361654}
m_Father: {fileID: 4274832022762586}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!4 &4476664080796704
Transform:
Expand Down Expand Up @@ -1600,6 +1617,19 @@ Transform:
m_Father: {fileID: 4801690208821060}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 3.0275946, y: 0.066695124, z: 4.791916}
--- !u!4 &4615298118314180
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1937665238162648}
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_Children: []
m_Father: {fileID: 4274832022762586}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4629194356278368
Transform:
m_ObjectHideFlags: 1
Expand All @@ -1611,7 +1641,7 @@ Transform:
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
m_Children: []
m_Father: {fileID: 4274832022762586}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4647011019061770
Transform:
Expand Down Expand Up @@ -1677,7 +1707,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4274832022762586}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4716723811478582
Transform:
Expand Down Expand Up @@ -1979,17 +2009,17 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!82 &82988502466345010
--- !u!82 &82289300839046882
AudioSource:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1164595066363010}
m_GameObject: {fileID: 1937665238162648}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_audioClip: {fileID: 8300000, guid: aac9604135c7be94fba8fd70c4184407, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Expand Down Expand Up @@ -2028,7 +2058,7 @@ AudioSource:
m_Curve:
- serializedVersion: 2
time: 0
value: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
Expand Down Expand Up @@ -2270,6 +2300,21 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f2f82afd0eba08845840bbb819f61e5a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114253224428243426
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1164595066363010}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 91e1cdb2f640b9442ba4fa7158ec321b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TailChase: {fileID: 0}
m_Paw: {fileID: 0}
m_Bark: {fileID: 0}
m_MovementAudiosource: {fileID: 82289300839046882}
--- !u!114 &114274210798098350
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -3209,7 +3254,7 @@ RectTransform:
- {fileID: 224335698390808940}
- {fileID: 224540464950937806}
m_Father: {fileID: 4274832022762586}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
Expand Down
101 changes: 99 additions & 2 deletions Assets/Prefabs/Ground Characters/Test Dog.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ GameObject:
- component: {fileID: 136116443539993912}
- component: {fileID: 114371144244762886}
- component: {fileID: 114790119520008840}
- component: {fileID: 82309213767205268}
- component: {fileID: 114259639911344190}
m_Layer: 14
m_Name: Test Dog
m_TagString: Player
Expand Down Expand Up @@ -1597,7 +1599,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1497780920488766}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -23.8, y: 0.76, z: -20.88}
m_LocalPosition: {x: 0.89, y: 0.76, z: -1.1}
m_LocalScale: {x: 10, y: 10, z: 10}
m_Children:
- {fileID: 4528689228399078}
Expand Down Expand Up @@ -2508,7 +2510,87 @@ AudioSource:
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: aac9604135c7be94fba8fd70c4184407, type: 3}
m_PlayOnAwake: 1
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
--- !u!82 &82309213767205268
AudioSource:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1497780920488766}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Expand Down Expand Up @@ -2629,6 +2711,21 @@ MonoBehaviour:
m_RequiredAction: 8
m_RelatedScript: {fileID: 0}
m_RelatedGameobject: {fileID: 0}
--- !u!114 &114259639911344190
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1497780920488766}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 91e1cdb2f640b9442ba4fa7158ec321b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TailChase: {fileID: 0}
m_Paw: {fileID: 0}
m_Bark: {fileID: 0}
m_MovementAudiosource: {fileID: 82103515527864108}
--- !u!114 &114288941317450178
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
40 changes: 31 additions & 9 deletions Assets/PuppySounds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@
using System.Collections.Generic;
using UnityEngine;

public class PuppySounds : MonoBehaviour {
public class PuppySounds : MonoBehaviour
{

public AudioClip m_TailChase;
public AudioClip m_Paw;
public AudioClip m_Bark;

private AudioSource m_AudioSource;
public AudioSource m_MovementAudiosource;

// Use this for initialization
void Start () {
TimeManager m_TimeManager;

// Use this for initialization
void Start()
{
m_AudioSource = GetComponent<AudioSource>();
}

// Update is called once per frame
void Update () {

}
m_TimeManager = GameObject.FindGameObjectWithTag("Time Manager").GetComponent<TimeManager>();
}

// Update is called once per frame
void Update()
{

}

public void TailChase()
{
Expand All @@ -34,4 +41,19 @@ public void Bark()
{
m_AudioSource.PlayOneShot(m_Bark);
}

public void MoveSound(bool play)
{
if (play && m_TimeManager.m_GameState == TimeManager.GameState.NORMAL)
{
if (!m_MovementAudiosource.isPlaying)
{
m_MovementAudiosource.Play();
}
}
else
{
m_MovementAudiosource.Pause();
}
}
}
Loading

0 comments on commit 39db522

Please sign in to comment.