Esempio n. 1
0
 //加载界面背景图片
 public void SetLoadingWinBG(string bgName)
 {
     if (MyRoot.Invoke("AttachLoadingBg", bgName) == null)
     {
         Trace.LogError("call AttachLoadingBg  failed");
         return;
     }
 }
Esempio n. 2
0
 public void DisAttachLoadingBg()
 {
     if (MyRoot.Invoke("DisAttachLoadingBg") == null)
     {
         Trace.LogError("call DisAttachLoadingBg failed");
         return;
     }
 }
Esempio n. 3
0
    public void UpdateMouseLine(float rotation)
    {
        if (MyRoot == null || !MyRoot.IsValid())
        {
            return;
        }

        MyRoot.Invoke("UpdateMouseLine", rotation);
    }
Esempio n. 4
0
    public void SetMapSignalType(int signalType)
    {
        if (MyRoot == null || !MyRoot.IsValid())
        {
            return;
        }

        MyRoot.Invoke("SetMapSignalType", signalType);
    }
Esempio n. 5
0
 public void AttachWarLoadingMgr()
 {
     if (Value.IsValueValid(MyRoot))
     {
         if (MyRoot.Invoke("AttachWarLoadingMgr") == null)
         {
             Trace.LogError("call AttachWarLoadingMgr failed.");
             return;
         }
     }
 }
Esempio n. 6
0
 /// <summary>
 /// destroy 时移除背景动画
 /// </summary>
 private void DisAttachBackgroundMovie()
 {
     if (MyRoot != null && MyRoot.IsValid())
     {
         if (MyRoot.Invoke("DisAttachBackgroundMovie") == null)
         {
             Trace.LogError("call DisAttachBackgroundMovie failed");
             return;
         }
     }
 }
Esempio n. 7
0
 /// 外部调用UI上系统飘字信息
 public void onBroadFloatTextSystem(string stTextInfo = "", int nPosType = 0, int nTime = 0)
 {
     if (MyRoot != null && MyRoot.IsValid())
     {
         string stInfo = stTextInfo;
         UBB.toHtml(ref stInfo);
         if (null == MyRoot.Invoke("onBroadFloatTextSystem", stInfo, nPosType, nTime))
         {
             Trace.LogError("onBroadFloatTextSystem invoke == NULL stInfo = " + stInfo + ", nPosType = " + nPosType + "nTime = " + nTime);
         }
     }
 }
Esempio n. 8
0
    /// <summary>
    /// AS->    public function CreateMessageBox(_title:String,_message:String,_type:uint,_btnOKCallBack:String=null,_btnCancelCallBack:String=null)
    /// </summary>
    /// <param name="_title">信息框标题</param>
    /// <param name="_message">信息内容,可html</param>
    /// <param name="_type">信息框显示类型</param>
    /// <param name="_btnOKCallBack">确认按钮点击回调,可为空</param>
    /// <param name="_btnCancelCallBack">取消按钮点击回调,可为空</param>
    public void CreateMessageBox(string _title, string _message, EMessageBoxType _type, string _btnOKCallBack = null, string _btnCancelCallBack = null)
    {
        int type = (Convert.ToInt32(_type));

        Trace.Log("CreateMessageBox");
        if (MyRoot.Invoke("CreateMessageBox", _title, _message, type, _btnOKCallBack, _btnCancelCallBack) == null)
        {
            Trace.LogError("error call CreateMessageBox failed");
            return;
        }
        SetDepth((int)SFGFxMovieManager.EGFxMovieLayer.EGFxLayer_Loading);
    }
Esempio n. 9
0
 // 设置是否可选
 public void setIsEnable(bool bIsEnable)
 {
     if (!Value.IsValueValid(MyRoot))
     {
         return;
     }
     if (MyRoot.Invoke("setIsEnable", bIsEnable) == null)
     {
         Trace.LogError("call setIsEnale failed");
         return;
     }
 }
Esempio n. 10
0
    public void DisAttachStatusIndicatorBar()
    {
        if (!Value.IsValueValid(StatusIndicatorMC))
        {
            return;
        }

        if (MyRoot.Invoke("DisAttachStatusIndicatorBar") == null)
        {
            Trace.LogError("call DisAttachStatusIndicatorBar failed.");
            return;
        }
    }
Esempio n. 11
0
    public void HideTooltipEx(string _tooltipType)
    {
        if (_tooltipType != _curTooltipType)
        {
            return;
        }

        if (MyRoot.Invoke("HideTooltip") == null)
        {
            Trace.LogError("call HideTooltip error");
        }

        this._curTooltipType = "";
    }
Esempio n. 12
0
    public void ShowTooltipEx(Value _tooltipIns, double _x, double _y)
    {
        //Trace.LogError("ShowTooltipEx");

        /*
         * 传的位置要调整
         */
        if (MyRoot.Invoke("ShowTooltip", _tooltipIns, _x, _y) == null)
        {
            Trace.LogError("call ShowTooltip error");
        }
        //  else
        //      Trace.LogError("call ShowTooltip success");
    }
Esempio n. 13
0
    public void ShowMapSignal(bool bShow)
    {
        if (MyRoot == null || !MyRoot.IsValid())
        {
            return;
        }

        if (bShow)
        {
            PopupMovieManager.Instance.PushMovie(this);
            MyRoot.Invoke("SetMapSignalVisible", 1);
        }
        else
        {
            MyRoot.Invoke("SetMapSignalVisible", 0);
            PopupMovieManager.Instance.PopMovie(this);
        }
    }
Esempio n. 14
0
    // 设置自己段位,青铜五--王者
    public void SetStrengthLine(IntPtr ptrParam, int nPtrLen)
    {
        if (!Value.IsValueValid(MyRoot))
        {
            return;
        }
        IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);
        cmd_count nCountdata          = helper.get <cmd_count>();

        for (int i = 0; i < nCountdata.nCount; ++i)
        {
            cmd_entity_match_type_rank data = helper.get <cmd_entity_match_type_rank>();
            if (MyRoot.Invoke("SetStrengthLine", data.szGradeName) == null)
            {
                Trace.LogError("call SetStrengthLine failed");
                return;
            }
        }
    }
Esempio n. 15
0
    /// <summary>
    /// 判断要显示tooltip的目标所在位置属于舞台九宫格的哪个区域内
    /// </summary>
    /// <param name="_x">目标相对于舞台的x坐标</param>
    /// <param name="_y">目标相对于舞台的y坐标</param>
    /// <returns>0~8为3x3的九宫格格子序号</returns>
    public int GetTargetIn9Grid(double _x, double _y)
    {
        int   res      = -1;
        Value resValue = null;

        if (MyRoot.Invoke("ContainsPointInGrid", _x, _y) == null)
        {
            Trace.LogError("call ContainsPointInGrid failed");
            return(res);
        }

        if (!GetMemberWithCheck(MyRoot, "PointContainsInGridIndex", out resValue))
        {
            return(res);
        }
        res = (int)resValue;

        return(res);
    }