Show / Hide Table of Contents

Class DroppedItem

Base class for any items dropped on the floor that the player can collect

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
DroppedItem
DroppedCharmItem
DroppedCustomCharmItem
DroppedItemBasic
Namespace: WeaverCore.Components
Assembly: WeaverCore.dll
Syntax
public abstract class DroppedItem : MonoBehaviour

Fields

| Edit this page View Source

FlingAngleMinMax

Declaration
[SerializeField]
[Tooltip("The angle range the object will be flung at")]
public Vector2 FlingAngleMinMax
Field Value
Type Description
Vector2
| Edit this page View Source

FlingSpeedMinMax

Declaration
[SerializeField]
[Tooltip("The speed range the object will be flung at")]
public Vector2 FlingSpeedMinMax
Field Value
Type Description
Vector2

Properties

| Edit this page View Source

FlingOnStart

Declaration
public bool FlingOnStart { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

InspectionRegion

Declaration
public InspectRegion InspectionRegion { get; }
Property Value
Type Description
InspectRegion
| Edit this page View Source

ItemActive

Declaration
public bool ItemActive { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

RB

Declaration
public Rigidbody2D RB { get; }
Property Value
Type Description
Rigidbody2D
| Edit this page View Source

SettingsField

Declaration
public string SettingsField { get; set; }
Property Value
Type Description
string
| Edit this page View Source

SettingsStorage

Declaration
public SaveSpecificSettings SettingsStorage { get; set; }
Property Value
Type Description
SaveSpecificSettings

Methods

| Edit this page View Source

Awake()

Declaration
protected virtual void Awake()
| Edit this page View Source

CanSpawn()

Returns whether or not this item can spawn.

Declaration
protected virtual bool CanSpawn()
Returns
Type Description
bool

Returns true if the item can spawn. If false, then the item will get destroyed

| Edit this page View Source

GiveItem()

Gives the item to the player. This is automatically called when the player goes near the item and inspects it

Declaration
public void GiveItem()
| Edit this page View Source

OnActive()

Called when the item is spawned

Declaration
protected virtual void OnActive()
| Edit this page View Source

OnGiveItem()

Called when the player picks up an item. Implement your custom item behavior in here

Declaration
protected abstract void OnGiveItem()

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾