private CreatePulley()
    {
        if (_instance != null)
        {
            return;
        }

        _instance = this;
    }
Exemplo n.º 2
0
    public GameObject[] wheels; // Objects to use as wheels of pulley setups
    #endregion

    #region Methods

    #region Initialization

    private void Awake()
    {
        //scenarioManager = ScenarioManager.Instance;
        scenarioManager = FindObjectOfType <ScenarioManager>();
        //creationManager = scenarioManager.creationManager;
        createPulley = creationManager.GetComponent <CreatePulley>();

        // Nothing will work as intended if any of these references are not properly obtained.
        if (scenarioManager == null || creationManager == null || createPulley == null)
        {
            Debug.LogWarning(name + " did not obtain a necessary reference at awake.");
            Debug.Log("ScenarioManager is: " + scenarioManager +
                      "CreationManager is:" + creationManager +
                      "CreatePulley is:" + createPulley);
        }

        InformCreateClasses();
    }