示例#1
0
        /** [シングルトン]constructor
         */
        private Network()
        {
            //mode
            this.mode = Mode.None;

            //connect_auto
                        #if (USE_DEF_FEE_PUN)
            this.connect_auto = null;
                        #endif

            //ルート。
            this.root_gameobject      = new UnityEngine.GameObject();
            this.root_gameobject.name = "Network";
            UnityEngine.GameObject.DontDestroyOnLoad(this.root_gameobject);
            this.root_transform = this.root_gameobject.GetComponent <UnityEngine.Transform>();

            //disconnect_request
            this.disconnect_request = false;

            //player_list
            this.player_list = new System.Collections.Generic.List <Player_MonoBehaviour>();

            //my_player
            this.my_player = null;

            //recv_callback
            this.recv_callback = null;
        }
示例#2
0
        public void RecvString(int a_key, string a_value)
        {
            OnRemoteCallBack_Base t_callback = Fee.Network.Network.GetInstance().GetRecvCallBack();

            if (t_callback != null)
            {
                t_callback.OnRemoteCallString(this.playerlist_index, a_key, a_value);
            }
        }
示例#3
0
 /** 受信コールバック。設定。
  */
 public void SetRecvCallBack(OnRemoteCallBack_Base a_callback)
 {
     this.recv_callback = a_callback;
 }