Esempio n. 1
0
 public void StartGame(Stage stage)
 {
     if (StageSelector.Get().LoadStage(stage))
     {
         SelectEffect(false);
     }
 }
Esempio n. 2
0
 public void StartGame()
 {
     if (StageSelector.Get().LoadStage(firstStage))
     {
         TitleEffect(false);
     }
 }
Esempio n. 3
0
    public void initPlayer()
    {
        if (!!go_stage_selector)
        {
            __stage_selector = go_stage_selector.GetComponent <StageSelector>();
            if (!!__stage_selector)
            {
                if ((InterSceneCache.world_from == InterSceneCache.UNDEFINED) &&
                    (InterSceneCache.stage_from == InterSceneCache.UNDEFINED))
                {
                    __stage_selector.init(level_id, lstages[0]);  // default at stage 0
                }
                else if (InterSceneCache.stage_from != InterSceneCache.UNDEFINED)
                { // from stage
                    __stage_selector.init(level_id, lstages[InterSceneCache.stage_from]);
                }
                else
                { // from other world
                    foreach (LConnector lcon in lLConnectors)
                    {
                        if (lcon.level_target == InterSceneCache.world_from)
                        {
                            __stage_selector.init(level_id, lcon);
                            break;
                        }
                    }
                }

                Transform t_destination = __poi_locations[__stage_selector.selected_poi];
                __stage_selector.moveTo(t_destination);
            }
        }
    }
Esempio n. 4
0
    // Start is called before the first frame update
    void Start()
    {
        if (SceneSelector.GetCurrentSceneName().Contains("World"))
        {
            var music = MusicController.Get();
            if (music != null)
            {
                music.ChangeSound(music.TitleBGM);
                music.ApplyParamater("Scene", 2f / 2);
            }
        }
        else
        {
            var music = MusicController.Get();
            if (music != null)
            {
                music.ChangeSound(music.TitleBGM);
                music.ApplyParamater("Scene", 1f / 2);
            }
        }

        if (StageSelector.Get() != null && SceneSelector.Get() != null)
        {
            StageSelector.Get().lastWorldMap = SceneSelector.Get().CurrentScene;
        }
        SelectEffect(true);
    }
Esempio n. 5
0
    public void MenuWorld()
    {
        var sel = SceneSelector.Get();
        var sta = StageSelector.Get();

        if (sel != null && sta != null)
        {
            sel.LoadScene(sta.lastWorldMap, SceneSelector.SceneChangeType.CHANGE_FADE);
        }
        MenuEffect(false);
    }
    private void Awake()
    {
        instance = this;

        // init

        // 스크롤 벨류 측정
        distance = 1f / (SIZE - 1);
        for (int i = 0; i < SIZE; i++)
        {
            pos[i] = distance * i;
        }
    }
Esempio n. 7
0
    // Start is called before the first frame update
    void Start()
    {
        __stage_selector_ref = FindObjectOfType <StageSelector>();

        __stage_name_frame = GetComponentInChildren <UIStageName>();

        __replayFrame = GetComponentInChildren <UIReplayFrame>();
        if (!!__replayFrame)
        {
            RectTransform RT = __replayFrame.GetComponent <RectTransform>();
            Size     = RT.sizeDelta;
            Position = RT.localPosition;
        }
    }
Esempio n. 8
0
 public void StartGameStory()
 {
     StageAchievement.isCreativeMode = false;
     if (!StageAchievement.IsCleared(firstStage, 0))
     {
         StageSelector.Get().LoadStage(firstStage);
         StageSelector.Get().lastWorldMap = new SceneStage("World1");
     }
     else
     {
         StageSelector.Get().LoadStage(selectScene, SceneSelector.SceneChangeType.CHANGE_MOVE);
     }
     TitleEffect(false);
 }
Esempio n. 9
0
    public void StartGame(Stage stage)
    {
        Stage sstage = (stage.story != null /* && !StageAchievement.isCreativeMode*/) ? stage.story : stage;

        if (SceneSelector.GetCurrentSceneName().Contains("World"))
        {
            StageSelector.Get().LoadStage(sstage, SceneSelector.SceneChangeType.CHANGE_FADE);
        }
        else
        {
            StageSelector.Get().LoadStage(sstage, SceneSelector.SceneChangeType.CHANGE_MOVE);
        }
        SelectEffect(false);
    }
Esempio n. 10
0
 public void StageAchieveEffect(bool starting)
 {
     if (stageAchieve)
     {
         var text = StageSelector.Get()?.Current?.answer ?? "";
         stageAchieve.GetComponent <Animator>().SetBool("Enabled", starting && text != "");
         if (starting)
         {
             var title = stageAchieve.GetComponentInChildren <TMP_Text>();
             if (title)
             {
                 title.text = text;
             }
         }
     }
 }
Esempio n. 11
0
 public void StageChangeEffect(bool starting)
 {
     if (letterBox)
     {
         letterBox.GetComponent <Animator>().SetBool("Enabled", starting);
     }
     if (stageTitle)
     {
         stageTitle.GetComponent <Animator>().SetBool("Enabled", starting);
         if (starting)
         {
             var title = stageTitle.GetComponentInChildren <TMP_Text>();
             if (title)
             {
                 title.text = StageSelector.Get()?.Current?.stageName ?? "";
             }
         }
     }
 }
Esempio n. 12
0
    // Start is called before the first frame update
    void Start()
    {
        var sel = SceneSelector.Get();
        var sta = StageSelector.Get();

        if (sel != null && sta != null)
        {
            sta.lastWorldMap = sel.CurrentScene;
        }
        var music = MusicController.Get();

        if (music != null)
        {
            music.ChangeSound(music.TitleBGM);
            music.ApplyParamater("Scene", 0f / 2);
        }

        TitleEffect(true);

        CameraController.Get().Targetter.SetTarget(fixedPin);
    }
Esempio n. 13
0
    // Start is called before the first frame update
    void Start()
    {
        AddObserver(TL);

        var GO = AddPlayer(StartTile.transform.position);
        var PC = GO.GetComponent <PlayerController>();

        IM.Attach(PC);
        IM.Attach(this);

        TL.Mode = IM.CurrentMode;

        // NOTE(Toffa): We dont need to start the animation as we want to start white
        //CurrentCamera?.GetComponent<PostFXRenderer>().StartAnimation(GO.transform.position);

        levelUI_GO = Instantiate(levelUI_GOref, this.gameObject.transform);
        levelUI_GO.GetComponent <UITimeline>().setModel(this);
        levelUI_GO.GetComponent <UITimeline>().setDisplayedTimeline(PC.Mdl.TL);

        if (!MixerControl)
        {
            var Mixer = GameObject.Find("AudioMixerControl");
            if (Mixer)
            {
                MixerControl = Mixer.GetComponent <MasterMixerControl>();
            }
        }

        Mdl.AutoReplayTick.SetEndTime(Constants.RewindAnimationTime);
        Mdl.AutoRewindTick.SetEndTime(Constants.RewindAnimationTime);
        Movable.AnimationTime = Constants.MoveAnimationTime;

        GameObject stage_selec_go = GameObject.Find("stage_selector");

        CurrentStageSelector = stage_selec_go.GetComponent <StageSelector>();
    }
Esempio n. 14
0
 public void EndGame()
 {
     StageSelector.Get().LoadNextStage();
 }
Esempio n. 15
0
 public void StartGameCustom()
 {
     StageAchievement.isCreativeMode = true;
     StageSelector.Get().LoadStage(selectScene, SceneSelector.SceneChangeType.CHANGE_MOVE);
     TitleEffect(false);
 }