void Start()
    {
        /*#if UNITY_EDITOR
          enabled = false;
        #endif*/

        _plane = PlaneFader.Instance;
        if (_plane == null)
        {
          Debug.LogWarning("[" + GetType().ToString() + "] " + name + " : There is no plane fader in the current scene !");
          return;
        }
        _plane.fadeOut(_fadeSpeed);
        _progress = 1f;
        _targetProgress = 0f;

        CommandsConsole.instance.create();
    }
Exemple #2
0
    void Awake()
    {
        if (_instance != null)
        {
          DestroyImmediate(gameObject);
          return;
        }
        else _instance = this;
        DontDestroyOnLoad(gameObject);

        _progress = GetComponent<ProgressProcess>();
        _progress.AtTarget += executeEndCallback;

        _mat = GetComponent<Renderer>().material;
        Color color = _mat.color;
        color.a = 0f;
        _mat.color = color;
    }