Fixed bug with sound settings
This commit is contained in:
parent
d1406637d2
commit
d596deb373
@ -88,7 +88,7 @@ BlendTree:
|
|||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
m_Motion: {fileID: 7400000, guid: b900c5133de323a46a58498a00abc987, type: 2}
|
m_Motion: {fileID: 7400000, guid: b900c5133de323a46a58498a00abc987, type: 2}
|
||||||
m_Threshold: 0
|
m_Threshold: 0
|
||||||
m_Position: {x: 0, y: -1}
|
m_Position: {x: 0, y: 1}
|
||||||
m_TimeScale: 1
|
m_TimeScale: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_DirectBlendParameter: Blend
|
m_DirectBlendParameter: Blend
|
||||||
@ -96,7 +96,7 @@ BlendTree:
|
|||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
m_Motion: {fileID: 7400000, guid: 3233cd06998b20547adc8836d0a3f51a, type: 2}
|
m_Motion: {fileID: 7400000, guid: 3233cd06998b20547adc8836d0a3f51a, type: 2}
|
||||||
m_Threshold: 0.33333334
|
m_Threshold: 0.33333334
|
||||||
m_Position: {x: 0, y: 1}
|
m_Position: {x: 0, y: -1}
|
||||||
m_TimeScale: 1
|
m_TimeScale: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_DirectBlendParameter: Blend
|
m_DirectBlendParameter: Blend
|
||||||
@ -117,8 +117,8 @@ BlendTree:
|
|||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_DirectBlendParameter: Blend
|
m_DirectBlendParameter: Blend
|
||||||
m_Mirror: 0
|
m_Mirror: 0
|
||||||
m_BlendParameter: moveX
|
m_BlendParameter: Xinfo
|
||||||
m_BlendParameterY: moveY
|
m_BlendParameterY: Yinfo
|
||||||
m_MinThreshold: 0
|
m_MinThreshold: 0
|
||||||
m_MaxThreshold: 1
|
m_MaxThreshold: 1
|
||||||
m_UseAutomaticThresholds: 1
|
m_UseAutomaticThresholds: 1
|
||||||
@ -139,13 +139,13 @@ AnimatorController:
|
|||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 0}
|
||||||
- m_Name: moveX
|
- m_Name: Xinfo
|
||||||
m_Type: 1
|
m_Type: 1
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 0}
|
||||||
- m_Name: moveY
|
- m_Name: Yinfo
|
||||||
m_Type: 1
|
m_Type: 1
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
|
@ -38,6 +38,7 @@ public class ChangeScene : MonoBehaviour
|
|||||||
if(collision.gameObject.tag == "AnimatedDoorSceneTransition")
|
if(collision.gameObject.tag == "AnimatedDoorSceneTransition")
|
||||||
{
|
{
|
||||||
Debug.Log("Starting coroutine");
|
Debug.Log("Starting coroutine");
|
||||||
|
|
||||||
StartCoroutine(WaitForAnimationAndMoveToScene(0.3f, collision));
|
StartCoroutine(WaitForAnimationAndMoveToScene(0.3f, collision));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
|||||||
public class TriggerDoor : DetectionZone
|
public class TriggerDoor : DetectionZone
|
||||||
{
|
{
|
||||||
public string DoorOpenAnimatorParamName = "DoorOpen";
|
public string DoorOpenAnimatorParamName = "DoorOpen";
|
||||||
|
public static bool ableToOpen = false;
|
||||||
Animator animator;
|
Animator animator;
|
||||||
|
|
||||||
void Start(){
|
void Start(){
|
||||||
@ -15,6 +15,8 @@ public class TriggerDoor : DetectionZone
|
|||||||
void Update() {
|
void Update() {
|
||||||
if(detectedObjs.Count > 0) {
|
if(detectedObjs.Count > 0) {
|
||||||
animator.SetBool(DoorOpenAnimatorParamName, true);
|
animator.SetBool(DoorOpenAnimatorParamName, true);
|
||||||
|
ableToOpen = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
animator.SetBool(DoorOpenAnimatorParamName, false);
|
animator.SetBool(DoorOpenAnimatorParamName, false);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using GUI_Scripts.ProceduralGeneration;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[RequireComponent(typeof(NPC))]
|
[RequireComponent(typeof(NPC))]
|
||||||
@ -69,6 +70,7 @@ public class NPCFollowing : MonoBehaviour
|
|||||||
|
|
||||||
public void CheckDistance()
|
public void CheckDistance()
|
||||||
{
|
{
|
||||||
|
anim.SetBool("isRunning", true);
|
||||||
StopAllCoroutines();
|
StopAllCoroutines();
|
||||||
|
|
||||||
if (isAfterAction == false)
|
if (isAfterAction == false)
|
||||||
@ -78,13 +80,14 @@ public class NPCFollowing : MonoBehaviour
|
|||||||
agent.FindPath();
|
agent.FindPath();
|
||||||
|
|
||||||
StartCoroutine(agent.FollowPath());
|
StartCoroutine(agent.FollowPath());
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (approaching)
|
else if (approaching)
|
||||||
{
|
{
|
||||||
//start dialogue here
|
//start dialogue here
|
||||||
|
|
||||||
gameObject.GetComponent<NPC>().State = NPCStateEnum.Talking;
|
gameObject.GetComponent<NPC>().State = NPCStateEnum.Talking;
|
||||||
|
anim.SetBool("isRunning", false);
|
||||||
agent.path.Clear(); // if we are able to talgk we dont want go go further player
|
agent.path.Clear(); // if we are able to talgk we dont want go go further player
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,6 +108,7 @@ public class NPCFollowing : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
anim.SetBool("isChasing", false);
|
||||||
gameObject.GetComponent<NPC>().State = NPCStateEnum.Pending;
|
gameObject.GetComponent<NPC>().State = NPCStateEnum.Pending;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,14 @@ public class AStarPathfindingAgent : MonoBehaviour
|
|||||||
Pathfinder.FindPath(transform.position, point, this);
|
Pathfinder.FindPath(transform.position, point, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ControlAnim()
|
||||||
|
{
|
||||||
|
moveX = point.x - transform.position.x;
|
||||||
|
moveY = point.y - transform.position.y;
|
||||||
|
myAnim.SetFloat("Yinfo", moveY);
|
||||||
|
myAnim.SetFloat("Xinfo", moveX);
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerator FollowPath()
|
public IEnumerator FollowPath()
|
||||||
{
|
{
|
||||||
myAnim = GetComponent<Animator>();
|
myAnim = GetComponent<Animator>();
|
||||||
@ -101,6 +109,8 @@ public class AStarPathfindingAgent : MonoBehaviour
|
|||||||
myAnim.SetBool("Left", false);
|
myAnim.SetBool("Left", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//moveX = path[targetIndex].worldPosition.x - current.x;
|
||||||
|
//moveY = path[targetIndex].worldPosition.y - current.y;
|
||||||
moveX = point.x - current.x;
|
moveX = point.x - current.x;
|
||||||
moveY = point.y - current.y;
|
moveY = point.y - current.y;
|
||||||
myAnim.SetFloat("Yinfo", moveY);
|
myAnim.SetFloat("Yinfo", moveY);
|
||||||
|
@ -46,9 +46,14 @@ public class NPCManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
throw new Exception("Object not found");
|
throw new Exception("Object not found");
|
||||||
}
|
}
|
||||||
CreateThugs();
|
if (GameObject.FindGameObjectWithTag("EnemyCollection").transform.Find(bossThug.name) == null)
|
||||||
|
{
|
||||||
|
Debug.Log("Build me :D");
|
||||||
CreateBossThug();
|
CreateBossThug();
|
||||||
|
CreateThugs();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CreateThugs()
|
private void CreateThugs()
|
||||||
{
|
{
|
||||||
@ -83,6 +88,7 @@ public class NPCManager : MonoBehaviour
|
|||||||
|
|
||||||
private void CreateBossThug()
|
private void CreateBossThug()
|
||||||
{
|
{
|
||||||
|
Debug.Log("BOSS THUG IS CREATED!");
|
||||||
var modelBossThug = Resources.Load("SampleScene/Enemies/BossThug") as GameObject;
|
var modelBossThug = Resources.Load("SampleScene/Enemies/BossThug") as GameObject;
|
||||||
|
|
||||||
var BossThugClone = GameObject.Instantiate(modelBossThug, bossThug.position, Quaternion.identity, NPCCollection.transform);
|
var BossThugClone = GameObject.Instantiate(modelBossThug, bossThug.position, Quaternion.identity, NPCCollection.transform);
|
||||||
|
@ -6,35 +6,35 @@ EditorUserSettings:
|
|||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_ConfigSettings:
|
m_ConfigSettings:
|
||||||
RecentlyUsedScenePath-0:
|
RecentlyUsedScenePath-0:
|
||||||
value: 22424703114646680e0b0227036c7c151b12163e2d3a3f7e38271427fb
|
|
||||||
flags: 0
|
|
||||||
RecentlyUsedScenePath-1:
|
|
||||||
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
|
|
||||||
flags: 0
|
|
||||||
RecentlyUsedScenePath-2:
|
|
||||||
value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a123df6f23b34f1a923e7ee2e26
|
value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a123df6f23b34f1a923e7ee2e26
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedScenePath-3:
|
RecentlyUsedScenePath-1:
|
||||||
value: 200b1b3316501b4842040d290521103419001626232922236202182ac0e93a3cf1a817faf43f2b2f7631ec390a3b4f2afc031d12
|
value: 200b1b3316501b4842040d290521103419001626232922236202182ac0e93a3cf1a817faf43f2b2f7631ec390a3b4f2afc031d12
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedScenePath-4:
|
RecentlyUsedScenePath-2:
|
||||||
value: 22424703114646680e0b0227036c7c1102161b25212a357e38271427fb
|
value: 22424703114646680e0b0227036c7c1102161b25212a357e38271427fb
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedScenePath-5:
|
RecentlyUsedScenePath-3:
|
||||||
value: 22424703114646680e0b0227036c761e1821112620292135633c133af6f9
|
value: 22424703114646680e0b0227036c761e1821112620292135633c133af6f9
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedScenePath-6:
|
RecentlyUsedScenePath-4:
|
||||||
value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
|
value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedScenePath-7:
|
RecentlyUsedScenePath-5:
|
||||||
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
|
value: 22424703114646680e0b0227036c791904040c1c25242a312a2c5326ece92021
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedScenePath-8:
|
RecentlyUsedScenePath-6:
|
||||||
value: 22424703114646680e0b0227036c70050204112e291f2f2a2c3b1920caef212be7a923e7ee2e26
|
value: 22424703114646680e0b0227036c70050204112e291f2f2a2c3b1920caef212be7a923e7ee2e26
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedScenePath-9:
|
RecentlyUsedScenePath-7:
|
||||||
|
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
|
||||||
|
flags: 0
|
||||||
|
RecentlyUsedScenePath-8:
|
||||||
value: 22424703114646680e0b0227036c68190c160a2e042733232867083debf42d
|
value: 22424703114646680e0b0227036c68190c160a2e042733232867083debf42d
|
||||||
flags: 0
|
flags: 0
|
||||||
|
RecentlyUsedScenePath-9:
|
||||||
|
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
|
||||||
|
flags: 0
|
||||||
vcSharedLogLevel:
|
vcSharedLogLevel:
|
||||||
value: 0d5e400f0650
|
value: 0d5e400f0650
|
||||||
flags: 0
|
flags: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user