Compare commits

..

No commits in common. "e89ddca89bc57ae5842e23f7ba27abcef722b38a" and "b504f111f5329b52c3ae19dd66fe9194a42a5301" have entirely different histories.

9 changed files with 17 additions and 30 deletions

View File

@ -29,8 +29,8 @@ Transform:
m_GameObject: {fileID: 2907046783514947559} m_GameObject: {fileID: 2907046783514947559}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6} m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}

View File

@ -29,8 +29,8 @@ Transform:
m_GameObject: {fileID: 3355435593704932208} m_GameObject: {fileID: 3355435593704932208}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6} m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}

View File

@ -29,8 +29,8 @@ Transform:
m_GameObject: {fileID: 2405502523364773131} m_GameObject: {fileID: 2405502523364773131}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6} m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}

View File

@ -251,7 +251,7 @@ MonoBehaviour:
gender: FEMALE gender: FEMALE
speakingSpeed: 1.1 speakingSpeed: 1.1
playSound: 0 playSound: 0
generate: 0 generate: 1
--- !u!114 &913419294231391695 --- !u!114 &913419294231391695
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -270,6 +270,7 @@ MonoBehaviour:
_baseDevelopementPower: 100 _baseDevelopementPower: 100
_developementPower: 100 _developementPower: 100
eventRate: 1 eventRate: 1
_gameManager: {fileID: 0}
--- !u!114 &5010841683893516359 --- !u!114 &5010841683893516359
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -29,8 +29,8 @@ Transform:
m_GameObject: {fileID: 7697340910557049827} m_GameObject: {fileID: 7697340910557049827}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6} m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}

View File

@ -10069,10 +10069,6 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: NPC value: NPC
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6061794821799343082, guid: 8c373fc5dab15cb479b5aa211e1fee34, type: 3}
propertyPath: generate
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8838918674701777989, guid: 8c373fc5dab15cb479b5aa211e1fee34, type: 3} - target: {fileID: 8838918674701777989, guid: 8c373fc5dab15cb479b5aa211e1fee34, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 15.64 value: 15.64

View File

@ -20,30 +20,22 @@ public class DeveloperNeeds : MonoBehaviour
public void spawnNeed(string needName) public void spawnNeed(string needName)
{ {
GameObject spawnedNeed = null;
switch (needName) switch (needName)
{ {
case "coffee": case "coffee":
spawnedNeed = Instantiate(Needs[0], new Vector3(0.0f, 1.5f, 0.0f), Needs[0].transform.rotation); Instantiate(Needs[0], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
break; break;
case "mate": case "mate":
spawnedNeed = Instantiate(Needs[1], new Vector3(0.0f, 1.5f, 0.0f), Needs[0].transform.rotation); Instantiate(Needs[1], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
break; break;
case "toilet": case "toilet":
spawnedNeed = Instantiate(Needs[2], new Vector3(0.0f, 1.5f, 0.0f), Needs[0].transform.rotation); Instantiate(Needs[2], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
break; break;
case "money": case "money":
spawnedNeed = Instantiate(Needs[3], new Vector3(0.0f, 1.5f, 0.0f), Needs[0].transform.rotation); Instantiate(Needs[3], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
break; break;
default: default:
break; break;
} }
if (spawnedNeed != null)
{
spawnedNeed.transform.SetParent(transform, false);
}
} }
} }

View File

@ -34,7 +34,6 @@ public class NPC_Behavior : MonoBehaviour
private GameManager _gameManager; private GameManager _gameManager;
private DeveloperNeeds _developerNeeds; private DeveloperNeeds _developerNeeds;
private bool spawned = true;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
@ -47,11 +46,9 @@ public class NPC_Behavior : MonoBehaviour
void Update() void Update()
{ {
// fire event // fire event
if (spawned) if (UnityEngine.Random.Range(0, 60) == 0)
{ {
spawned = false; Debug.Log("TEST");
List<string> needs = new List<string>() { "coffee", "mate", "toilet", "money" };
_developerNeeds.spawnNeed(needs[UnityEngine.Random.Range(0, 3)]);
} }
} }

View File

@ -220,6 +220,7 @@ public class Text2Speech : MonoBehaviour
File.WriteAllBytes(tempFilePath, audioBytes); File.WriteAllBytes(tempFilePath, audioBytes);
StartCoroutine(LoadWavAudio(tempFilePath)); StartCoroutine(LoadWavAudio(tempFilePath));
SaveAudioFile(base64AudioContent);
} }
IEnumerator LoadWavAudio(string path) IEnumerator LoadWavAudio(string path)