This commit is contained in:
magn9775
2024-04-26 09:19:27 +02:00
parent 4740a04736
commit d491c6dee7
21 changed files with 2165 additions and 23268 deletions

View File

@@ -10,17 +10,13 @@ public class NPCimproved : MonoBehaviour
private bool walking = true;
void Start()
{
}
void Update()
{
if (walking)
{
//npcPrefab.transform.position += new Vector3(0,0,0.005f);
npcPrefab.transform.position += transform.forward * Time.deltaTime;
npcPrefab.transform.position = new Vector3(npcPrefab.transform.position.x, 0, npcPrefab.transform.position.z);
}
//animator.SetBool("IsTurning", false);
@@ -42,7 +38,7 @@ public class NPCimproved : MonoBehaviour
if (col.gameObject.tag == "Wall")
{
npcPrefab.transform.eulerAngles += new Vector3(0,180,0);
npcPrefab.transform.eulerAngles += new Vector3(0,120,0);
}
}