Begin Adventurer_controller
This commit is contained in:
parent
03f1bbc599
commit
9f73ff8cb6
3 changed files with 35 additions and 3 deletions
21
Assets/Scripts/Characters/Aventurer_controller.cs
Normal file
21
Assets/Scripts/Characters/Aventurer_controller.cs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/Characters/Aventurer_controller.cs.meta
Normal file
11
Assets/Scripts/Characters/Aventurer_controller.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 22b09b5d562c1e74abd88b1c50145650
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -177,7 +177,7 @@ public class Client_controller : MonoBehaviour, IUsable
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
protected virtual void Start()
|
||||||
{
|
{
|
||||||
if(gameObject.layer != LayerMask.NameToLayer("Interactions"))
|
if(gameObject.layer != LayerMask.NameToLayer("Interactions"))
|
||||||
Debug.LogWarning(gameObject.name+" layer should be set to 'Interactions' to work properly");
|
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
|
// Update is called once per frame
|
||||||
void Update()
|
protected virtual void Update()
|
||||||
{
|
{
|
||||||
//Update status if it was requested
|
//Update status if it was requested
|
||||||
if(_lastStatusRequest !=null)
|
if(_lastStatusRequest !=null)
|
||||||
|
@ -292,7 +292,7 @@ public class Client_controller : MonoBehaviour, IUsable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDestroy()
|
protected void OnDestroy()
|
||||||
{
|
{
|
||||||
ClientManager.Instance.clientLeave(gameObject);
|
ClientManager.Instance.clientLeave(gameObject);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue