コード例 #1
0
    public void OnClick()
    {
        if (count == 0)
        {
            //NetSystem.Instance.Connect((int)RosettaSetup.NetCtr.Lobby, "ws://127.0.0.1:8080/PearlHarbor/Game", 8080);
            NetSystem.Instance.Connect((int)NetCtr.Lobby, "192.168.1.111", 33333);
        }
        if (count > 0)
        {
            NetPacket pa = new NetPacket(PacketType.CS_HelloWorld);
            XMessage.CS_HelloWorld proto = new XMessage.CS_HelloWorld();
            proto.Int    = count + 70000;
            proto.Float  = 0.998f;
            proto.String = "helloworld";
            proto.Long   = 22222 - count;
            pa.Proto     = proto;
            NetSystem.Instance.Send((int)NetCtr.Lobby, pa);
        }

        Alkaid.MyRandom mr = new Alkaid.MyRandom();
        Debug.LogWarning("Framework 1000   " + mr.GetRandomNum1000());

        GameObject go = mr.CreateOne();

        //go.transform.parent = this.transform;
        go.name = "createone:" + count++;
        go.transform.localPosition = Vector3.one * count;


        //WindowManager.Instance.ShowWindow("LogoWindow");
    }
コード例 #2
0
ファイル: TestMono.cs プロジェクト: AlkaidFang/Rosetta
    public void OnClick()
    {
        if (count == 0)
        {
            //NetSystem.Instance.Connect((int)RosettaSetup.NetCtr.Lobby, "ws://127.0.0.1:8080/PearlHarbor/Game", 8080);
            NetSystem.Instance.Connect((int)NetCtr.Lobby, "192.168.1.111", 33333);
        }
        if (count > 0)
        {
            NetPacket pa = new NetPacket(PacketType.CS_HelloWorld);
            XMessage.CS_HelloWorld proto = new XMessage.CS_HelloWorld();
            proto.Int = count + 70000;
            proto.Float = 0.998f;
            proto.String = "helloworld";
            proto.Long = 22222 - count;
            pa.Proto = proto;
            NetSystem.Instance.Send((int)NetCtr.Lobby, pa);
        }

        Alkaid.MyRandom mr = new Alkaid.MyRandom();
        Debug.LogWarning("Framework 1000   " + mr.GetRandomNum1000());

        GameObject go = mr.CreateOne();
        //go.transform.parent = this.transform;
        go.name = "createone:" + count++;
        go.transform.localPosition = Vector3.one * count;

        //WindowManager.Instance.ShowWindow("LogoWindow");
    }