Example #1
0
        public Scene EnterScene(SceneManager _this, ObjPlayer obj, ulong guid)
        {
            var scene = GetScene(_this, guid);

            if (scene == null)
            {
                Logger.Error("EnterScene Error sceneGuid={0},objGuid={1}", guid, obj.ObjId);
                return(null);
            }
            scene.EnterScene(obj);
            if (obj.GetAllianceId() != 0)
            {
                CoroutineFactory.NewCoroutine(NotifyChangeScene, obj, scene.TypeId).MoveNext();
            }
            //后台统计
            try
            {
                string v = string.Format("scene#{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                                         obj.ServerId,
                                         obj.ObjId,
                                         obj.GetLevel(),
                                         obj.Attr.GetFightPoint(),                      //战力
                                         obj.Scene.TypeId,
                                         0,                                             //0:进入  1:离开
                                         DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")); // 时间
                PlayerLog.Kafka(v);
            }
            catch (Exception)
            {
            }
            return(scene);
        }