示例#1
0
    void Awake()
    {
        this.freenet = gameObject.AddComponent <CFreeNetUnityService>();
        this.freenet.appcallback_on_message        += this.on_message;
        this.freenet.appcallback_on_status_changed += this.on_status_changed;

        this.sending_queue = new Queue <CPacket>();
    }
示例#2
0
    public void Awake()
    {
        this.txtServerMsg = GameObject.Find("txtServerMsg").GetComponent <Text>();

        this.gameserver = gameObject.AddComponent <CFreeNetUnityService>();

        this.gameserver.appcallback_on_status_changed += on_status_changed;

        this.gameserver.appcallback_on_message += on_message;
    }
    void Awake()
    {
        this.received_msg = "";

        // 네트워크 통신을 위해 CFreeNetUnityService객체를 추가합니다.
        this.gameserver = gameObject.AddComponent <CFreeNetUnityService>();

        // 상태 변화(접속, 끊김등)를 통보 받을 델리게이트 설정.
        this.gameserver.appcallback_on_status_changed += on_status_changed;

        // 패킷 수신 델리게이트 설정.
        this.gameserver.appcallback_on_message += on_message;
    }
示例#4
0
    void Init()
    {
        this.received_msg = "";


        gameserver = gameObject.AddComponent <CFreeNetUnityService>();


        gameserver.appcallback_on_status_changed += OnStatusChanged;

        // 패킷 수신 델리게이트 설정.
        gameserver.appcallback_on_message += OnMessage;
    }
示例#5
0
    void Awake()
    {
        Inst = this;

        this.received_msg = "";

        this.gameserver = gameObject.AddComponent <CFreeNetUnityService>();

        this.gameserver.appcallback_on_status_changed += on_status_changed;

        this.gameserver.appcallback_on_message += on_message;

        connect();
    }
示例#6
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != null)
        {
            Destroy(gameObject);
        }
        DontDestroyOnLoad(gameObject);

        // 네트워크 통신을 위해 CFreeNetUnityService객체를 추가합니다.
        this.gameserver = gameObject.AddComponent <CFreeNetUnityService>();

        // 상태 변화(접속, 끊김등)를 통보 받을 델리게이트 설정.
        this.gameserver.appcallback_on_status_changed += on_status_changed;

        // 패킷 수신 델리게이트 설정.
        this.gameserver.appcallback_on_message += on_message;
    }
示例#7
0
 private void Awake()
 {
     this.gameserver = gameObject.AddComponent <CFreeNetUnityService>();
     this.gameserver.appcallback_on_status_changed += on_status_changed;
     this.gameserver.appcallback_on_message        += on_message;
 }