mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
40 lines
759 B
C#
40 lines
759 B
C#
//WIP
|
|
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class NPC : MonoBehaviour
|
|
{
|
|
|
|
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()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
//NPC movement determined by script in subclasses
|
|
void FixedUpdate()
|
|
{
|
|
controller.Move(horizontalMove *Time.fixedDeltaTime, false, false);
|
|
}
|
|
}
|