Mosaic Simulator

【Introduction】

You are the video editor, and you need to blur and bleep out special words



【Game link】



【Github】



【Note】

How to implement replay: in a period of time, record the player’s location, behavior, etc., and then take out the series of things in the replay, it will be like a replay!
The disadvantage of recording is that if the time is very long, it will make the whole system inefficient, so increase the time interval to reduce the number of recordings.

replayreplay.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//record position
public void recordPosition(Vector3 pos, float time)
{
PosState posState = new PosState();
posState._pos = pos;
posState._time = time;
_posList.Add(posState);
}
//replay position
public Vector3 replayPos()
{
if (isReplay)
{
if (posIndex == _posList.Count) posDoWork = false;
if (posDoWork && nowTime > _posList[posIndex]._time)
{
posIndex++;
return _posList[posIndex - 1]._pos;
}
}
return new Vector3(-999,-999,-999);

}



【Reference】

prev:Sumo next:No Fish No Love