コード例 #1
0
        private CheckpointFlag CreateRestartFlag(string textureName)
        {
            CheckpointFlag newFlag = new CheckpointFlag(_nextCheckpointIndex++);

            newFlag.FlagTextureName = textureName;

            return(newFlag);
        }
コード例 #2
0
 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;
             }
         }
     }
 }
コード例 #3
0
        private CheckpointFlag CreateRestartFlag(string textureName)
        {
            CheckpointFlag newFlag = new CheckpointFlag(_nextCheckpointIndex++);
            newFlag.FlagTextureName = textureName;

            return newFlag;
        }
コード例 #4
0
 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();
 }