Files
FueraDeEscala/Assets/Game Kit Controller/Scripts/Inventory/inventoryObject.cs

95 lines
2.7 KiB
C#
Raw Normal View History

using UnityEngine;
using System.Collections;
public class inventoryObject : MonoBehaviour
{
2026-03-29 23:03:14 -07:00
[Header ("Main Settings")]
[Space]
2026-03-29 23:03:14 -07:00
public inventoryInfo inventoryObjectInfo;
2026-03-29 23:03:14 -07:00
[Space]
[Header ("Main Inventory Object Settings")]
[Space]
2026-03-29 23:03:14 -07:00
public objectOnInventory mainObjectOnInventory;
2026-03-29 23:03:14 -07:00
[Space]
[Header ("Inventory Settings")]
[Space]
2026-03-29 23:03:14 -07:00
public bool useZoomRange = true;
public float maxZoom = 30;
public float minZoom = 100;
public float initialZoom = 46;
2026-03-29 23:03:14 -07:00
[Space]
2026-03-29 23:03:14 -07:00
public Vector3 meshPositionOffset;
public Vector3 meshRotationOffset;
2026-03-29 23:03:14 -07:00
private void Start ()
{
inventoryObjectInfo.InitializeAudioElements ();
}
2026-03-29 23:03:14 -07:00
public void useObjectOnNewBehavior (GameObject currentPlayer, int amountToUse)
{
if (mainObjectOnInventory != null) {
mainObjectOnInventory.activateUseObjectActionOnInventory (currentPlayer, amountToUse);
}
}
2026-03-29 23:03:14 -07:00
public void useObjectOnNewBehaviorWithExternalCharacter (GameObject currentPlayer, GameObject currentExternalCharacterForInventoryUsage, int amountToUse)
{
if (mainObjectOnInventory != null) {
mainObjectOnInventory.activateUseObjectActionOnInventoryWithExternalCharacter (currentPlayer, currentExternalCharacterForInventoryUsage, amountToUse);
}
}
2026-03-29 23:03:14 -07:00
public void combineObjectsOnNewBehavior (GameObject currentPlayer, inventoryInfo inventoryInfoToUse)
{
if (mainObjectOnInventory != null) {
mainObjectOnInventory.activateCombineObjectActionOnInventory (currentPlayer, inventoryInfoToUse);
}
}
2026-03-29 23:03:14 -07:00
public void carryPhysicalObjectFromInventory (GameObject currentPlayer)
{
if (mainObjectOnInventory != null) {
mainObjectOnInventory.carryPhysicalObjectFromInventory (currentPlayer);
}
}
2026-03-29 23:03:14 -07:00
public void eventOnPickObjectNewBehaviour (GameObject currentPlayer)
{
if (mainObjectOnInventory != null) {
mainObjectOnInventory.eventOnPickObject (currentPlayer);
}
}
2026-03-29 23:03:14 -07:00
public void eventOnDropObjectNewBehaviour (GameObject currentPlayer)
{
if (mainObjectOnInventory != null) {
mainObjectOnInventory.eventOnDropObject (currentPlayer);
}
}
2026-03-29 23:03:14 -07:00
public bool setObjectEquippedStateOnInventoryOnNewBehavior (GameObject currentPlayer, bool state)
{
if (mainObjectOnInventory != null) {
return mainObjectOnInventory.setObjectEquippedStateOnInventory (currentPlayer, state);
}
2026-03-29 23:03:14 -07:00
return false;
}
public string getCustomMessageOnNotAbleToEquip ()
{
if (mainObjectOnInventory != null) {
return mainObjectOnInventory.getCustomMessageOnNotAbleToEquip ();
}
return "";
}
}