Пример #1
0
 public void ReceiveHeartBeat()
 {
     ReLoginTimer.Restart();
     BadNetTimer.Restart();
     AppFacade.Instance.GetManager <NetConditionManager>(ManagerName.NetCondition).HideNetCondition();
     Util.CallMethod("Network", "ClientHeartBeat");
 }
Пример #2
0
        private void OnVerInfoLoaded(bool loadOk)
        {
            if (loadOk)
            {
                Util.CallMethod("Game", "OnInitOK");    //初始化完成
                NetManager.OnInit();                    //初始化网络

                //加载表格
                AppFacade.Instance.GetManager <TutorialManager>(ManagerName.Tutorial).LoadTutorialTable();
                initialize = true;                                          //初始化完
            }
        }
Пример #3
0
        public void SetData()
        {
            object[] data   = Util.CallMethod("UIMainModule", "GetStages");
            LuaTable stages = data[0] as LuaTable;

            _opponentOriTotalHp = 0;
            _myOriTotalHp       = 0;
            DicOpponentBoss.Clear();
            DicMyBossHp.Clear();
            DicOriOpponentBoss.Clear();
            for (int i = 1; i <= stages.Length; i++)
            {
                LuaTable MyStage = stages[i] as LuaTable;
                if (MyStage != null)
                {
                    int LevelID = int.Parse(MyStage.GetStringField("id"));
                    int ID      = int.Parse(MyStage.GetStringField("boss_id"));
                    int HP      = int.Parse(MyStage.GetStringField("boss_hp"));
                    OpponentBossId[i - 1] = ID;
                    LevelId[i - 1]        = LevelID;
                    DicOpponentBoss.Add(ID, HP);
                    DicOriOpponentBoss.Add(ID, HP);
                    MyBossId[i - 1] = i;

                    int mybossHp = 0;
                    if (i == 1)
                    {
                        mybossHp = UIFight.MyBoss1Hp;
                    }
                    else if (i == 2)
                    {
                        mybossHp = UIFight.MyBoss2Hp;
                    }
                    else if (i == 3)
                    {
                        mybossHp = UIFight.MyBoss3Hp;
                    }

                    DicMyBossHp.Add(MyBossId[i - 1], mybossHp);
                    _myOriTotalHp += mybossHp;

                    _opponentOriTotalHp += HP;
                }
            }

            if (stages.Length < 3)
            {
                DebugUtil.Error("不足三个场景");
            }

            moduleFight.SetData();
        }
Пример #4
0
        public void Execute(object data)
        {
            if (data == null)
            {
                return;
            }
            KeyValuePair <int, ByteBuffer> buffer = (KeyValuePair <int, ByteBuffer>)data;

            switch (buffer.Key)
            {
            default: Util.CallMethod("Network", "OnSocket", buffer.Key, buffer.Value); break;
            }
        }
Пример #5
0
 protected void OnDragEnd()
 {
     Util.CallMethod("UIMainCtrl", "OnDragEnd");
 }
Пример #6
0
 /// <summary>
 /// ִ��Lua����
 /// </summary>
 public object[] CallMethod(string func, params object[] args)
 {
     return(Util.CallMethod("Network", func, args));
 }
Пример #7
0
 protected void Update()
 {
     Util.CallMethod(name, "OnUpdate");
 }
Пример #8
0
 protected void OnClickEvent(GameObject go)
 {
     Util.CallMethod(name, "OnClick", go);
 }
Пример #9
0
 protected void OnClick()
 {
     Util.CallMethod(name, "OnClick");
 }
Пример #10
0
 protected void Start()
 {
     Util.CallMethod(name, "Start");
 }
Пример #11
0
 protected void Awake()
 {
     Util.CallMethod(name, "Awake", gameObject);
 }