19 lines
434 B
C#
19 lines
434 B
C#
using Unity.Netcode;
|
|
|
|
namespace Reset.Units{
|
|
public class UnitComponent : NetworkBehaviour{
|
|
private bool enabledAsHost = true;
|
|
|
|
private Unit _unit;
|
|
internal Unit Unit{
|
|
get {
|
|
if (_unit == null) { _unit = GetComponent<Unit>(); }
|
|
return _unit;
|
|
}
|
|
}
|
|
|
|
void DisableComponent(){
|
|
enabledAsHost = false;
|
|
}
|
|
}
|
|
} |