Esempio n. 1
0
    //public List<string> removedSelectedGIDs;

    IEnumerator Start()
    {
        this.model = new ChainXModel();
        this.model.SetController(this);
        GameObject anObj = this.CreateVoxel(0, Const.UI_SELECTING_VOXEL_NAME, Vector3.zero);

        anObj.transform.SetParent(GameObject.Find(Const.PAINT_TOOL_PATH).transform);
        anObj.GetComponent <Renderer>().enabled = false;
        anObj.layer = Const.UI_LAYER;

        this.paintTool         = GameObject.Find(Const.PAINT_TOOL_PATH + Const.UI_SELECTING_POINTER_NAME);
        this.paintTool.layer   = Const.UI_LAYER;
        this.screenSize.width  = Screen.width;
        this.screenSize.height = Screen.height;
        this.SetPositionOfPaintTool();
        this.debuggerObj = GameObject.Find("DebugLog/Viewport/Content");

        this.cv = new ChainVoxel(this);
        this.selectedObjects = new List <GameObject> ();
        //this.removedSelectedGIDs = new List<string> ();
        this.socket = new EmulatedWebSocket(this);
        StartCoroutine(this.socket.Connect());
        //Util.START_NANO_TIME = System.DateTime.Now.Ticks; //タイムスタンプ開始
        yield return(this.socket.Listen());
    }
Esempio n. 2
0
    public static void Test()
    {
        EmulatedWebSocket socket = new EmulatedWebSocket(null);

        string opLine;

        byte[] opBinary;

        opLine   = "OPERATION@{xxfefegege}@24";
        opBinary = System.Text.Encoding.ASCII.GetBytes(opLine);
        Debug.Assert(
            socket.getAtIndexFromEnd(ref opBinary) == ("OPERATION@{xxfefegege}@".Length - 1)
            );

        opLine   = "OPERATION@{xxfefegege}@24";
        opBinary = System.Text.Encoding.ASCII.GetBytes(opLine);
        socket.getIdFromEndUntilAt(ref opBinary);
        socket.getOperationFromEndUntilAt(ref opBinary);
    }