42 lines
959 B
C#
42 lines
959 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace LS_LevelStreaming
|
|
{
|
|
public class LS_ManagedObjectInstantiateDeactivate : LS_ManagedObjectInstantiateDestroy
|
|
{
|
|
public LS_ManagedObjectInstantiateDeactivate(string p_resourcePath, Vector3 p_position, Quaternion p_rotation, Vector3 p_scale, LS_ITriggerByUpdatedPosition p_trigger, Action<int, GameObject> p_onInstantiated, Action<int, GameObject> p_onDeactivated)
|
|
: base(p_resourcePath, p_position, p_rotation, p_scale, p_trigger, p_onInstantiated, p_onDeactivated)
|
|
{
|
|
}
|
|
|
|
protected override void Hide()
|
|
{
|
|
if (m_instance != null)
|
|
{
|
|
m_instance.SetActive(false);
|
|
if (m_onDestroyed != null)
|
|
{
|
|
m_onDestroyed(base.ID, m_instance);
|
|
}
|
|
}
|
|
}
|
|
|
|
protected override void Show()
|
|
{
|
|
if (m_instance != null)
|
|
{
|
|
m_instance.SetActive(true);
|
|
if (m_onInstantiated != null)
|
|
{
|
|
m_onInstantiated(base.ID, m_instance);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
base.Show();
|
|
}
|
|
}
|
|
}
|
|
}
|