コード例 #1
0
ファイル: StoryTellScreen.cs プロジェクト: Mouserr/CrazyBalls
 // Start is called before the first frame update
 void Start()
 {
     _episodes         = new List <EpisodeData>();
     _episodes         = StoryPoints.Select(c => c.Episode).ToList();
     CurrentStoryPoint = StoryPoints.First();
     CurrentStoryPoint.Activate();
     Player.CurrentEpisode = CurrentStoryPoint.Episode;
     Description.text      = CurrentStoryPoint.Episode.Description;
 }
コード例 #2
0
ファイル: StoryTellScreen.cs プロジェクト: Mouserr/CrazyBalls
    public void NextStoryPoint()
    {
        //  CurrentStoryPoint.IsActive = false;
        var currentIndex = StoryPoints.ToList().IndexOf(CurrentStoryPoint);

        currentIndex++;
        if (currentIndex >= StoryPoints.Length)
        {
            return;
        }
        CurrentStoryPoint     = StoryPoints[currentIndex];
        Player.CurrentEpisode = CurrentStoryPoint.Episode;
        CurrentStoryPoint.Activate();
        Description.text = CurrentStoryPoint.Episode.Description;
    }