breakpoint
before update unity version
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -9,9 +10,18 @@ namespace BITKit.Entities
|
||||
[SerializeField] private bool serverOnly;
|
||||
[SerializeReference,SubclassSelector] private INetClient netClient;
|
||||
[SerializeReference,SubclassSelector] private INetServer netServer;
|
||||
public override void OnUpdate(float deltaTime)
|
||||
[SerializeReference,SubclassSelector] private ITicker ticker;
|
||||
public override void OnStart()
|
||||
{
|
||||
base.OnStart();
|
||||
ticker?.Add(OnTick);
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
ticker?.Remove(OnTick);
|
||||
}
|
||||
private void OnTick(float deltaTime)
|
||||
{
|
||||
base.OnUpdate(deltaTime);
|
||||
if (netClient.IsConnected && serverOnly)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
|
Reference in New Issue
Block a user