added: units can now have their movement settings set through rpc
This commit is contained in:
@@ -1,13 +1,25 @@
|
||||
using Unity.Netcode;
|
||||
|
||||
public class UnitComponent : NetworkBehaviour{
|
||||
private bool enabledAsHost = true;
|
||||
|
||||
void DisableComponents(){
|
||||
enabledAsHost = false;
|
||||
}
|
||||
|
||||
void Update(){
|
||||
|
||||
namespace Reset.Units{
|
||||
public class UnitComponent : NetworkBehaviour{
|
||||
private bool enabledAsHost = true;
|
||||
|
||||
private Unit _unit;
|
||||
|
||||
internal Unit Unit{
|
||||
get {
|
||||
if (_unit != null) {
|
||||
return _unit;
|
||||
}
|
||||
|
||||
_unit = GetComponent<Unit>();
|
||||
|
||||
return _unit;
|
||||
}
|
||||
}
|
||||
|
||||
void DisableComponent(){
|
||||
enabledAsHost = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user