示例#1
0
    // Use this for initialization
    void Start()
    {
        //Defaults the UI to be Invisible
        UIright.setActive(false);
        UIleft.setActive(false);
        //Server Manager Object
        cbm = new ClientBTManager();
        //Packets
        cbm.PacketReceived += Recieved;
        //connected
        cbm.Connected += OnConnect;
        cbm.Initialize();

        mainCamera = Camera.main;
        //gives indexed for each index
        points = new Vector3[9];
        objs   = new GameObject[9];

        //fills each vector array
        for (int i = 0; i < 9; i++)
        {
            //creates a sphere
            objs[i] = GameObject.CreatePrimitive(PrimitiveType.Sphere);
            //size of the object
            objs[i].transform.localScale = new Vector3(0.02f, 0.02f, 0.02f);
        }
    }
示例#2
0
    float angle        = 110.0f; // Degrees

    // Use this for initialization
    void Start()
    {
        cbm = new ClientBTManager();
        cbm.PacketReceived += Recieved;
        cbm.Connected      += OnConnect;
        cbm.Initialize();

        mainCamera = Camera.main;

        points = new Vector3[9];
        objs   = new GameObject[9];

        for (int i = 0; i < 9; i++)
        {
            objs[i] = GameObject.CreatePrimitive(PrimitiveType.Sphere);
            objs[i].transform.localScale = new Vector3(0.02f, 0.02f, 0.02f);
        }
    }