Class Loot
Describes an InteractableObject that can be picked up and grants a specific item when interacted with.
It will also play a small animation (object going in an arc from spawn point to a random point around) when the object is actually "spawned", and the object becomes interactable only when that animation is finished.
Finally it will notify the LootUI that a new loot is available in the world so the UI displays the name.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Loot
Inherited Members
Namespace: CreatorKitCode
Assembly: Assembly-CSharp.dll
Syntax
public class Loot : InteractableObject
Fields
Item
Declaration
public Item Item
Field Value
Type | Description |
---|---|
Item |
Properties
IsInteractable
Declaration
public override bool IsInteractable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
InteractWith(CharacterData)
Declaration
public override void InteractWith(CharacterData target)
Parameters
Type | Name | Description |
---|---|---|
CharacterData | target |
Overrides
Spawn(Vector3)
This is called when the loot become available. It will setup to play the small spawn animation. This is rarely called manually, and mostly called by the LootSpawner class.
Declaration
public void Spawn(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position |
Start()
Declaration
protected override void Start()