using UnityEngine;
using Lightbug.Utilities;
namespace Lightbug.CharacterControllerPro.Demo
{
///
/// This abstract class represents a basic platform.
///
public abstract class Platform : MonoBehaviour
{
///
/// Gets the RigidbodyComponent component associated to the character.
///
public RigidbodyComponent RigidbodyComponent { get; protected set; }
protected virtual void Awake()
{
RigidbodyComponent = RigidbodyComponent.CreateInstance(gameObject);
if (RigidbodyComponent == null)
{
Debug.Log("(2D/3D)Rigidbody component not found! \nDynamic platforms must have a Rigidbody component associated.");
this.enabled = false;
}
}
}
}