예제 #1
0
    public void LoadData()
    {
        if (transData == null)
        {
            GameObject obj = GameObject.FindGameObjectWithTag("TransitionData");
            transData = obj.GetComponentInChildren <DataTransition>();
        }

        if (levelConfig == null)
        {
            levelConfig = SingletonJsonLoadable <ConfigurationLevelDataPair> .Instance;
        }

        levelConfig.Configure("LevelData/" + transData.nextLevelPath, "LevelData/" + transData.nextLevelPath);
        levelConfig.Load();

        startingMoment = levelConfig.data.startingMoment;
        startingMoment.BuildLevel(levelConfig.data.levelAsString);

        moments = new List <List <LevelMoment> >();

        List <LevelMoment> startingTimeline = new List <LevelMoment>
        {
            startingMoment.DeepCopyLevelMoment()
        };

        moments.Add(startingTimeline);
    }
예제 #2
0
    private void OnEnable()
    {
        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");

        foreground = obj.GetComponentInChildren <Animator>();
        contFore   = obj.GetComponentInChildren <ControllerForeground>();

        contFore.FadeInEvent += BackToMenu;
        foreground.SetTrigger("FadeOut");

        obj       = GameObject.FindGameObjectWithTag("TransitionData");
        transData = obj.GetComponentInChildren <DataTransition>();
    }
예제 #3
0
    private void Start()
    {
        button = GetComponentInChildren <Button>();
        button.onClick.AddListener(() => OnButtonPress());

        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");

        foreground = obj.GetComponentInChildren <Animator>();
        contFore   = obj.GetComponentInChildren <ControllerForeground>();

        obj            = GameObject.FindGameObjectWithTag("TransitionData");
        dataTransition = obj.GetComponentInChildren <DataTransition>();
    }
예제 #4
0
    private void AssignValues()
    {
        transitionData = GameObject.FindGameObjectWithTag("TransitionData")
                                        .GetComponentInChildren<DataTransition>();

        globalMusic = GameObject.FindGameObjectWithTag("GlobalMusic");
        momentDisplayCont = GameObject.FindGameObjectWithTag("MomentDisplayController");

        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");
        if(obj != null)
        {
            foreground = obj.GetComponentInChildren<Animator>();
            contFore = obj.GetComponentInChildren<ControllerForeground>();
        }        
    }