1
This commit is contained in:
@@ -36,14 +36,15 @@ namespace BITKit.Entities
|
||||
allowGlobalActivation = true
|
||||
};
|
||||
protected readonly ValidHandle AllowRendering = new();
|
||||
public virtual string AddressablePath => throw new System.NotImplementedException();
|
||||
public virtual string AddressablePath => item.AddressablePath;
|
||||
protected virtual Vector3 meleeForce => Transform.forward;
|
||||
public bool IsEntered { get; set; }
|
||||
|
||||
public virtual void Entry()
|
||||
{
|
||||
AllowRendering.AddElement(this);
|
||||
inputActionGroup.allowInput.AddElement(this);
|
||||
animator.animator.enabled = true;
|
||||
animator.animator.Update(0);
|
||||
}
|
||||
public virtual UniTask EntryAsync()
|
||||
{
|
||||
@@ -52,7 +53,7 @@ namespace BITKit.Entities
|
||||
|
||||
public virtual void Exit()
|
||||
{
|
||||
inputActionGroup.allowInput.AddElement(this);
|
||||
inputActionGroup.allowInput.RemoveElement(this);
|
||||
}
|
||||
public virtual UniTask ExitAsync()
|
||||
{
|
||||
@@ -61,8 +62,13 @@ namespace BITKit.Entities
|
||||
}
|
||||
public virtual void OnAwake()
|
||||
{
|
||||
AllowRendering.AddListener(x=>renderers.ForEach(y=>y.enabled = x));
|
||||
AllowRendering.AddListener(x=>renderers.ForEach(y=>
|
||||
{
|
||||
y.enabled = x;
|
||||
animator.animator.enabled = x;
|
||||
}));
|
||||
AllowRendering.Invoke();
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user