96 lines
2.3 KiB
C#
96 lines
2.3 KiB
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class MarryRingCtr {
|
|
//private static MarryRingCtr m_Indtance;
|
|
//public static MarryRingCtr Instance
|
|
//{
|
|
// get { return GetInstance(); }
|
|
//}
|
|
//public static MarryRingCtr GetInstance()
|
|
//{
|
|
// if (m_Indtance == null)
|
|
// m_Indtance = new MarryRingCtr();
|
|
// return m_Indtance;
|
|
//}
|
|
|
|
//戒指类型
|
|
public enum RingType
|
|
{
|
|
Invalid = -1,
|
|
Single = 0,
|
|
Marry = 1,
|
|
Divorce = 2,
|
|
}
|
|
|
|
public MarryRingCtr()
|
|
{
|
|
_MarryRingIfo = new RingInfo(0, (int)RingType.Invalid, 0);
|
|
_LoverName = "";
|
|
}
|
|
|
|
private RingInfo _MarryRingIfo;
|
|
public RingInfo MarryRingIfo
|
|
{
|
|
get { return _MarryRingIfo; }
|
|
}
|
|
|
|
//上线的时候要不要保存一份
|
|
public struct RingInfo //等级 类型 双方署名
|
|
{
|
|
public int ringLevel;
|
|
public int ringType;
|
|
public int ringExp;
|
|
public RingInfo(int _RingLevel, int _RingType, int _RingExp)
|
|
{
|
|
ringLevel = _RingLevel;
|
|
ringType = _RingType;
|
|
ringExp = _RingExp;
|
|
}
|
|
}
|
|
|
|
private string _LoverName = "";
|
|
public string loverName
|
|
{
|
|
set { _LoverName = value; }
|
|
get { return _LoverName; }
|
|
}
|
|
public void SetLoverName(string name)
|
|
{
|
|
loverName = name;
|
|
}
|
|
|
|
public void SetRingInfo(int _RingLevel, int _RingType, int _RingExp)
|
|
{
|
|
_MarryRingIfo = new RingInfo(_RingLevel, _RingType, _RingExp);
|
|
}
|
|
|
|
public RingInfo GetRingInfo()
|
|
{
|
|
return _MarryRingIfo;
|
|
}
|
|
|
|
//显示自身的接口
|
|
public static void ShowRingTips(bool isShowLevelUpPanel)
|
|
{
|
|
UIManager.ShowUI(UIInfo.MarryRingTips, delegate(bool bSucess, object param) {
|
|
if(bSucess)
|
|
{
|
|
MarryRingTips.Instance.InitRingTips(isShowLevelUpPanel);
|
|
}
|
|
});
|
|
}
|
|
|
|
//预览接口(预览自身结婚戒指 对方戒指及婚后戒指)
|
|
public static void ShowRingTips(int type, int level)
|
|
{
|
|
UIManager.ShowUI(UIInfo.MarryRingTips, delegate (bool bSucess, object param)
|
|
{
|
|
if (bSucess)
|
|
{
|
|
MarryRingTips.Instance.InitRingTips(type, level);
|
|
}
|
|
});
|
|
}
|
|
}
|