init
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using RPGCoreCommon.DynamicValues;
|
||||
using RPGCoreCommon.Helpers.PropertyAttributeDrawers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RPGCore.Core.Objects
|
||||
{
|
||||
[RequireComponent(typeof(CapsuleCollider))]
|
||||
public class UnitObject : BaseObject
|
||||
{
|
||||
[DynamicValueProvider]
|
||||
private ObjectModule<UnitObject> UnitModuleProvider(Type moduleType) => GetComponent(moduleType) as ObjectModule<UnitObject>;
|
||||
|
||||
[field: SerializeField, ReadOnly] public CapsuleCollider unitCollider { get; private set; }
|
||||
|
||||
protected new void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
unitCollider = GetComponent<CapsuleCollider>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user