Beispiel #1
0
    void Start()
    {
        connectToLocal = Config.ConnectToLocal;
        lsysController = LSystemController.Instance();

        if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android)
        {
            connectToLocal = false;
        }

        if (connectToLocal)
        {
            string localIP;
            using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0))
            {
                socket.Connect("8.8.8.8", 65530);
                IPEndPoint endPoint = socket.LocalEndPoint as IPEndPoint;
                localIP = endPoint.Address.ToString();
            }

            UriString = $"ws://{localIP}:8081/ckar_consume";
        }

        if (UriString == "")
        {
            ConnectToMaster();
        }
    }
    // Start is called before the first frame update
    protected override void Start()
    {
        base.Start();

        wedgeMeshGen   = WedgeMeshGen.Instance();
        lsysController = LSystemController.Instance();
    }
Beispiel #3
0
    public void SwitchView(string newViewKey)
    {
        key = newViewKey;
        GetComponent <TextMesh>().text = key;
        LSystem lsys = LSystemController.Instance().GetLSystem(key);

        GameObject.Find("LGenerator").GetComponent <LGenerator>().SetLSystem(lsys);
        GameObject.Find("AGenerator").GetComponent <LGenerator>().SetLSystem(lsys);
        GameObject.Find("RGenerator").GetComponent <LGenerator>().SetLSystem(lsys);
    }
Beispiel #4
0
    // Start is called before the first frame update
    protected override void Start()
    {
        int i = 0;

        foreach (char symbol in LSystemController.Instance().Symbols)
        {
            lookup.Add(symbol, Prefabs[i]);
            i++;
        }

        lookup.Add('N', NullObject);
    }
Beispiel #5
0
    // Start is called before the first frame update
    protected override void Start()
    {
        base.Start();

        int i = 0;

        foreach (char symbol in LSystemController.Instance().Symbols)
        {
            lookup.Add(symbol, Prefabs[i]);
            i++;
        }
    }
 // Start is called before the first frame update
 void Start()
 {
     LSysController = LSystemController.Instance();
     shapeLookup    = new Dictionary <string, GameObject>()
     {
         { "1", Shape1 },
         { "2", Shape2 },
         { "3", Shape3 },
         { "4", Shape4 },
         { "5", Shape5 },
         { "6", Shape6 },
         { "7", Shape7 }
     };
 }
    // Start is called before the first frame update
    protected override void Start()
    {
        base.Start();

        lsysController = LSystemController.Instance();
        meshgen        = ArcMeshGen.Instance();

        int i = 0;

        foreach (char symbol in lsysController.Symbols)
        {
            lookup.Add(symbol, Materials[i]);
            i++;
        }
    }
 public void SetLSystemKey(string key)
 {
     SetLSystem(LSystemController.Instance().GetLSystem(key));
 }
    // Start is called before the first frame update
    protected override void Start()
    {
        base.Start();

        lsysController = LSystemController.Instance();
    }