mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-11-11 04:22:40 +00:00
Worked on base movement for npcs and figured out activating/deactivating textbox
This commit is contained in:
1 parent
d53725e3f0
commit
6af09046ce
6 files changed
+65
-6
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user