Begin Adventurer_controller

This commit is contained in:
Antoine H 2021-02-04 09:53:02 +01:00
parent 03f1bbc599
commit 9f73ff8cb6
3 changed files with 35 additions and 3 deletions

View file

@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//Define the behavior of an adventurer
//TODO : Add talking behavior, etc.
public class Aventurer_controller : Client_controller
{
// Start is called before the first frame update
protected override void Start()
{
base.Start(); //Call Client_controller Start()
}
// Update is called once per frame
//TODO : Request from client manager seat to wait when leaving to talk.
protected override void Update()
{
base.Update(); //Call Client_controller Update
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 22b09b5d562c1e74abd88b1c50145650
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -177,7 +177,7 @@ public class Client_controller : MonoBehaviour, IUsable
}
// Start is called before the first frame update
void Start()
protected virtual void Start()
{
if(gameObject.layer != LayerMask.NameToLayer("Interactions"))
Debug.LogWarning(gameObject.name+" layer should be set to 'Interactions' to work properly");
@ -209,7 +209,7 @@ public class Client_controller : MonoBehaviour, IUsable
}
// Update is called once per frame
void Update()
protected virtual void Update()
{
//Update status if it was requested
if(_lastStatusRequest !=null)
@ -292,7 +292,7 @@ public class Client_controller : MonoBehaviour, IUsable
}
}
void OnDestroy()
protected void OnDestroy()
{
ClientManager.Instance.clientLeave(gameObject);
}