50 lines
1.0 KiB
C#
50 lines
1.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Invector;
|
|
using Invector.Utils;
|
|
using Lean.Pool;
|
|
using UnityEngine;
|
|
|
|
namespace Beyond
|
|
{
|
|
|
|
public class StreamedResource : MonoBehaviour
|
|
{
|
|
private SerializedStreamedItem m_streamedItem;
|
|
|
|
public SerializedStreamedItem StreamedItem
|
|
{
|
|
set
|
|
{
|
|
m_streamedItem = value;
|
|
}
|
|
}
|
|
|
|
public void OnEnable()
|
|
{
|
|
//find tags and disaple after respawning
|
|
var comment = GetComponentInChildren<vLookAtCamera>();
|
|
|
|
if (comment != null)
|
|
{
|
|
comment.gameObject.SetActive(false);
|
|
}
|
|
|
|
}
|
|
|
|
public void OnCollect()
|
|
{
|
|
if (m_streamedItem != null)
|
|
m_streamedItem.isAvailable = false;
|
|
LeanPool.Despawn(gameObject);
|
|
}
|
|
|
|
|
|
public void OnDisable()
|
|
{
|
|
//Debug.Log("Test");
|
|
}
|
|
}
|
|
|
|
} |