// Use this for initialization
    void Start()
    {
        //Get connection manager
        connectionManager = FindObjectOfType <aConnectionManager>();
        gameManager       = GameObject.FindGameObjectWithTag("GameManager");

        thisObject = this.gameObject;
    }
示例#2
0
    // Use this for initialization
    public void Start()
    {
        ///Errors and Warnings
        //If the node type is not define, throw an error
        if (nodeType == Type.ET_NULL)
        {
            Debug.LogError(this.gameObject.name + " Does not have a defined nodeType!");
        }

        //If the node isn't a microphone and there isn't an acceptable type
        if (nodeType != Type.ET_MICROPHONE && acceptableTypes.Length == 0)
        {
            Debug.LogError(this.gameObject.name + " does not hold a list of acceptable types");
        }

        //If there's a connection manager
        if (FindObjectOfType <aConnectionManager>())
        {
            connectionManager = FindObjectOfType <aConnectionManager>();
        }
        //If there's no connection manager
        else
        {
            Debug.LogError("There is no connection manager present on the scene");
        }

        if (maximumInputs == 0 || maximumOutputs == 0)
        {
            Debug.LogError(this.gameObject.name + " has no designated number of maximum outputs or inputs");
        }

        counter = 0;

        gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();

        starting = GameObject.FindObjectsOfType <SignalFlowStart>();
        for (int index = 0; index < starting.Length; index++)
        {
            startingNodes.Add(starting[index].gameObject);
        }

        if (nodeType == Type.ET_MICROPHONE)
        {
            sendingSignal = true;
        }
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     polyCol2D = gameObject.AddComponent <PolygonCollider2D>();
     conMan    = FindObjectOfType <aConnectionManager>();
 }
示例#4
0
 private void Start()
 {
     //Set connection manager
     connectionManager = FindObjectOfType <aConnectionManager>();
 }