Worked on base movement for npcs and figured out activating/deactivating textbox

This commit is contained in:
Rizvee committed 2022-02-21 12:07:17 -06:00
1 parent d53725e3f0
commit 6af09046ce
6 files changed
+65 -6

No files matched your search

+22 -1
View File
@@ -1,10 +1,25 @@
//WIP
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NPC : MonoBehaviour
{
// Start is called before the first frame update
public Movement controller;
float horizontalMove = 0f;
public float runSpeed = 40f;
public string title = "";
//constructs an NPC using parameters
public NPC(string name, float run, float hor)
{
title = name;
runSpeed = run;
horizontalMove = hor;
}
void Start()
{
@@ -15,4 +30,10 @@ public class NPC : MonoBehaviour
{
}
//NPC movement determined by script in subclasses
void FixedUpdate()
{
controller.Move(horizontalMove *Time.fixedDeltaTime, false, false);
}
}