Beispiel #1
0
 private void DestroyTempVars()
 {
     _tempStartNode   = null;
     _tempStartObject = null;
     _tempLine        = null;
     _tempLineObject  = null;
     _tempEndNode     = null;
     _tempEndObject   = null;
 }
Beispiel #2
0
    public IoConnection(GameObject input, GameObject output, IoLine ioLine)
    {
        _input  = input;
        _output = output;

        _ioLine = ioLine;

        Debug.Log(string.Format("Input is {0} and output is {1}", _input, _output));

        Init();
    }
Beispiel #3
0
    public void SelectStart(GameObject g)
    {
        SelectionInteraction._instance.Play(g);

        _tempStartNode   = g;
        _tempStartObject = g.transform.parent.gameObject;


        if (CheckValidStartConnection(_tempStartObject))
        {
            _tempLineObject = new GameObject();
            _tempLineObject.transform.SetParent(g.transform);
            IoLine line = _tempLineObject.AddComponent <IoLine> ();
            _tempLine = line;

            // Create a new GameObject to hold the line
            line.Init(_tempLineObject, _lineWidth, _lineColor, g);
        }
        else
        {
            // Debug.Log ("Not a valid input/output");
            DestroyLine();
        }
    }