コード例 #1
0
    public static Checkpoint GetCheckpointFromMinified(MinifiedCheckpoint minCheckpoint)
    {
        if (minCheckpoint == null)
        {
            return(null);
        }

        Checkpoint[] checkpoints = FindObjectsOfType <Checkpoint>();
        return(Array.Find(checkpoints, checkpoint => checkpoint.GetId() == minCheckpoint.id));
    }
コード例 #2
0
 public void SetLastActivatedCheckpoint(string sceneName, MinifiedCheckpoint checkpoint)
 {
     foreach (Level level in levels)
     {
         if (level.sceneName == sceneName)
         {
             level.latestCheckpoint = checkpoint;
         }
     }
 }