51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using System.Collections;
|
|
using Cute;
|
|
using UnityEngine;
|
|
using Wizard;
|
|
|
|
public class MyPageCardPanel : MonoBehaviour
|
|
{
|
|
|
|
[SerializeField]
|
|
private bool enableMaintenanceCheck;
|
|
|
|
[SerializeField]
|
|
protected NetworkDefine.MAINTENANCE_TYPE maintenanceType;
|
|
|
|
[SerializeField]
|
|
private NetworkDefine.MAINTENANCE_TYPE[] _maintenanceTypeList;
|
|
|
|
private CardPanelMaintenancePlate _maintenancePlate;
|
|
|
|
private Vector3? _savedPosition;
|
|
|
|
public int Index { get; set; }
|
|
|
|
private void ShowMaintenance()
|
|
{
|
|
if (_maintenancePlate == null)
|
|
{
|
|
GameObject prefab = null; // Pre-Phase-5b: no PrefabMgr headless
|
|
_maintenancePlate = NGUITools.AddChild(base.gameObject, prefab).GetComponent<CardPanelMaintenancePlate>();
|
|
}
|
|
_maintenancePlate.gameObject.SetActive(value: true);
|
|
UIManager.SetObjectToGrey(base.gameObject, b: true);
|
|
UIManager.SetObjectToGrey(_maintenancePlate.gameObject, b: false);
|
|
}
|
|
|
|
private void HideMaintenance()
|
|
{
|
|
if (_maintenancePlate != null)
|
|
{
|
|
_maintenancePlate.gameObject.SetActive(value: false);
|
|
}
|
|
UIManager.SetObjectToGrey(base.gameObject, b: false);
|
|
}
|
|
|
|
public Vector3 SavePosition()
|
|
{
|
|
_savedPosition = base.transform.localPosition;
|
|
return _savedPosition.Value;
|
|
}
|
|
}
|