Compare commits
No commits in common. "e89ddca89bc57ae5842e23f7ba27abcef722b38a" and "b504f111f5329b52c3ae19dd66fe9194a42a5301" have entirely different histories.
e89ddca89b
...
b504f111f5
|
@ -29,8 +29,8 @@ Transform:
|
|||
m_GameObject: {fileID: 2907046783514947559}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6}
|
||||
m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
|
||||
m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
@ -29,8 +29,8 @@ Transform:
|
|||
m_GameObject: {fileID: 3355435593704932208}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6}
|
||||
m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
|
||||
m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
@ -29,8 +29,8 @@ Transform:
|
|||
m_GameObject: {fileID: 2405502523364773131}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6}
|
||||
m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
|
||||
m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
@ -251,7 +251,7 @@ MonoBehaviour:
|
|||
gender: FEMALE
|
||||
speakingSpeed: 1.1
|
||||
playSound: 0
|
||||
generate: 0
|
||||
generate: 1
|
||||
--- !u!114 &913419294231391695
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -270,6 +270,7 @@ MonoBehaviour:
|
|||
_baseDevelopementPower: 100
|
||||
_developementPower: 100
|
||||
eventRate: 1
|
||||
_gameManager: {fileID: 0}
|
||||
--- !u!114 &5010841683893516359
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -29,8 +29,8 @@ Transform:
|
|||
m_GameObject: {fileID: 7697340910557049827}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.6, y: 0.05, z: 0.6}
|
||||
m_LocalPosition: {x: 16.851439, y: 4.76935, z: -2.999632}
|
||||
m_LocalScale: {x: 0.5, y: 0.05, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
@ -10069,10 +10069,6 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: NPC
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6061794821799343082, guid: 8c373fc5dab15cb479b5aa211e1fee34, type: 3}
|
||||
propertyPath: generate
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8838918674701777989, guid: 8c373fc5dab15cb479b5aa211e1fee34, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 15.64
|
||||
|
|
|
@ -20,30 +20,22 @@ public class DeveloperNeeds : MonoBehaviour
|
|||
|
||||
public void spawnNeed(string needName)
|
||||
{
|
||||
|
||||
GameObject spawnedNeed = null;
|
||||
|
||||
switch (needName)
|
||||
{
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (spawnedNeed != null)
|
||||
{
|
||||
spawnedNeed.transform.SetParent(transform, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ public class NPC_Behavior : MonoBehaviour
|
|||
|
||||
private GameManager _gameManager;
|
||||
private DeveloperNeeds _developerNeeds;
|
||||
private bool spawned = true;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
|
@ -47,11 +46,9 @@ public class NPC_Behavior : MonoBehaviour
|
|||
void Update()
|
||||
{
|
||||
// fire event
|
||||
if (spawned)
|
||||
if (UnityEngine.Random.Range(0, 60) == 0)
|
||||
{
|
||||
spawned = false;
|
||||
List<string> needs = new List<string>() { "coffee", "mate", "toilet", "money" };
|
||||
_developerNeeds.spawnNeed(needs[UnityEngine.Random.Range(0, 3)]);
|
||||
Debug.Log("TEST");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -220,6 +220,7 @@ public class Text2Speech : MonoBehaviour
|
|||
File.WriteAllBytes(tempFilePath, audioBytes);
|
||||
|
||||
StartCoroutine(LoadWavAudio(tempFilePath));
|
||||
SaveAudioFile(base64AudioContent);
|
||||
}
|
||||
|
||||
IEnumerator LoadWavAudio(string path)
|
||||
|
|
Loading…
Reference in New Issue