32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class WorldObject : MonoBehaviour
|
|
{
|
|
[Tooltip("Is the object culled at a near distance?")]
|
|
public bool largeObject = false;
|
|
[Tooltip("Can players walk on top of the object, bridges etc.")]
|
|
public bool canWalkOnTop = false;
|
|
[Tooltip("can players walk through the object, portals etc.")]
|
|
public bool canWalkThrough = false;
|
|
|
|
[Tooltip("Set to true for objects which can be interacted with. e.g ammo box")]
|
|
public bool interactiable = false;
|
|
[Tooltip("The message to show to the player when they can interact with this object")]
|
|
[TextArea(1,2)] public string interactMessage = "Press i to re-stock ammo.";
|
|
[Tooltip("The distance from the object the player needs to be to interact")]
|
|
public float interactDistance = 3.0f;
|
|
|
|
[Tooltip("The distance from the object the player needs to be to interact")]
|
|
public bool destroyOnStart = false;
|
|
|
|
public bool showInteractionRadius = false;
|
|
|
|
void OnDrawGizmos()
|
|
{
|
|
if (showInteractionRadius) Gizmos.DrawWireSphere(transform.position, interactDistance);
|
|
}
|
|
|
|
}
|