Ejemplo n.º 1
0
 /// <summary>
 /// 获取主角对象
 /// </summary>
 public IGameSceneObj GetCurrentPlayer()
 {
     if (null == mScene)
     {
         return(null);
     }
     return(mScene.GetSceneObjByIdent(mStrPlayerIdent));
 }
Ejemplo n.º 2
0
        public GameSceneObj GetSceneObj(ObjectID ident)
        {
            try
            {
                if (ident.IsNull())
                {
                    return(null);
                }

                if (m_client == null)
                {
                    return(null);
                }

                GameScene scene = (GameScene)m_client.GetCurrentScene();
                if (scene == null)
                {
                    return(null);
                }

                GameSceneObj sceneObj = scene.GetSceneObjByIdent(ident);
                return(sceneObj);
            }
            catch (Exception ex)
            {
                //Log.Trace("Exception:" + ex.ToString());
                return(null);
            }
        }
Ejemplo n.º 3
0
        public GameSceneObj GetSceneObj(string ident)
        {
            try
            {
                if (null == ident || ident.Length == 0)
                {
                    return(null);
                }

                if (m_client == null)
                {
                    return(null);
                }

                GameScene scene = (GameScene)m_client.GetCurrentScene();
                if (scene == null)
                {
                    return(null);
                }

                GameSceneObj sceneObj = scene.GetSceneObjByIdent(ident);
                return(sceneObj);
            }
            catch (Exception ex)
            {
                LogSystem.Log("Exception:", ex.ToString());
                return(null);
            }
        }