private CheckpointFlag CreateRestartFlag(string textureName) { CheckpointFlag newFlag = new CheckpointFlag(_nextCheckpointIndex++); newFlag.FlagTextureName = textureName; return(newFlag); }
private void UpdateCheckpointSequence(CheckpointFlag targetFlag, int numberToSetTo) { List<IGameObject> flags = GameObjects(typeof(CheckpointFlag)); if ((numberToSetTo < flags.Count) && (targetFlag.CheckpointIndex != numberToSetTo)) { for (int i = 0; i < flags.Count; i++) { if (((CheckpointFlag)flags[i]).CheckpointIndex == numberToSetTo) { ((CheckpointFlag)flags[i]).CheckpointIndex = targetFlag.CheckpointIndex; targetFlag.CheckpointIndex = numberToSetTo; break; } } } }
private CheckpointFlag CreateRestartFlag(string textureName) { CheckpointFlag newFlag = new CheckpointFlag(_nextCheckpointIndex++); newFlag.FlagTextureName = textureName; return newFlag; }
private void RemoveSelectedCheckpointFromSortOrder(CheckpointFlag toRemove) { List<IGameObject> flags = GameObjects(typeof(CheckpointFlag)); for (int i = 0; i < flags.Count; i++) { if (((CheckpointFlag)flags[i]).CheckpointIndex > toRemove.CheckpointIndex) { ((CheckpointFlag)flags[i]).CheckpointIndex--; } } FlagFactory.DecrementNextCheckpointIndex(); }