예제 #1
0
    /// <summary>
    /// Gets the latest chunk in the currentChunks list.
    /// </summary>
    /// <param name="_length"></param>
    /// <returns>_chunkMoverEntry.Chunk</returns>
    public GameObject GetLastestChunk(out float _length)
    {
        ChunkByChunkLengthPair _chunkMoverEntry = currentChunks[currentChunks.Count - 1];

        _length = _chunkMoverEntry.Length;
        return(_chunkMoverEntry.Chunk);
    }
예제 #2
0
    private void AddChunk(GameObject _chunk, float _length)
    {
        ChunkByChunkLengthPair _chunkMoverEntry = new ChunkByChunkLengthPair
        {
            Chunk  = _chunk,
            Length = _length,
        };

        currentChunks.Add(_chunkMoverEntry);
    }
예제 #3
0
    private void RemoveFirstChunk()
    {
        ChunkByChunkLengthPair _chunkMoverEntry = currentChunks[0];

        currentChunks.Remove(_chunkMoverEntry);

        if (ChunkRemovedEvent != null)
        {
            ChunkRemovedEvent(_chunkMoverEntry.Chunk);
        }
    }
예제 #4
0
    /// <summary>
    /// Gets the latest chunk in the currentChunks list.
    /// </summary>
    /// <returns>_chunkMoverEntry.Chunk</returns>
    public GameObject GetLastestChunk()
    {
        ChunkByChunkLengthPair _chunkMoverEntry = currentChunks[currentChunks.Count - 1];

        return(_chunkMoverEntry.Chunk);
    }