From 9f73ff8cb63772e18223caf0a0e19284c4c3f714 Mon Sep 17 00:00:00 2001 From: Antoine H Date: Thu, 4 Feb 2021 09:53:02 +0100 Subject: [PATCH] Begin Adventurer_controller --- .../Characters/Aventurer_controller.cs | 21 +++++++++++++++++++ .../Characters/Aventurer_controller.cs.meta | 11 ++++++++++ .../Scripts/Characters/Client_controller.cs | 6 +++--- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 Assets/Scripts/Characters/Aventurer_controller.cs create mode 100644 Assets/Scripts/Characters/Aventurer_controller.cs.meta diff --git a/Assets/Scripts/Characters/Aventurer_controller.cs b/Assets/Scripts/Characters/Aventurer_controller.cs new file mode 100644 index 0000000..b564d24 --- /dev/null +++ b/Assets/Scripts/Characters/Aventurer_controller.cs @@ -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 + } +} diff --git a/Assets/Scripts/Characters/Aventurer_controller.cs.meta b/Assets/Scripts/Characters/Aventurer_controller.cs.meta new file mode 100644 index 0000000..d48ce3d --- /dev/null +++ b/Assets/Scripts/Characters/Aventurer_controller.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22b09b5d562c1e74abd88b1c50145650 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Characters/Client_controller.cs b/Assets/Scripts/Characters/Client_controller.cs index c8f47c7..9c32d06 100644 --- a/Assets/Scripts/Characters/Client_controller.cs +++ b/Assets/Scripts/Characters/Client_controller.cs @@ -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); }