void CollisionAgainstCheckPoint(Collider other) { CheckPoint cp = other.transform.GetComponent <CheckPoint>(); if (cp != null) { UnlockCheckpoint(cp); } }
void UnlockCheckpoint(CheckPoint cp) { List <int> list = SaveManager.Instance.checkPointLoader.sceneSelection. GetUnlockedCheckPoints(cp.IslandType); if (!list.Contains(cp.Index)) { list.Add(cp.Index); } SaveManager.Instance.SaveData(); }