()
| 1065 | let currentFinaleCount = 0; |
| 1066 | //随机生成一个烟花序列 |
| 1067 | function startSequence() { |
| 1068 | if (isFirstSeq) { |
| 1069 | isFirstSeq = false; |
| 1070 | if (IS_HEADER) { |
| 1071 | return seqTwoRandom(); |
| 1072 | } else { |
| 1073 | const shell = new Shell(crysanthemumShell(shellSizeSelector())); |
| 1074 | shell.launch(0.5, 0.5); |
| 1075 | return 2400; |
| 1076 | } |
| 1077 | } |
| 1078 | |
| 1079 | if (finaleSelector()) { |
| 1080 | seqRandomFastShell(); |
| 1081 | if (currentFinaleCount < finaleCount) { |
| 1082 | currentFinaleCount++; |
| 1083 | return 170; |
| 1084 | } else { |
| 1085 | currentFinaleCount = 0; |
| 1086 | return 6000; |
| 1087 | } |
| 1088 | } |
| 1089 | |
| 1090 | const rand = Math.random(); |
| 1091 | |
| 1092 | if (rand < 0.08 && Date.now() - seqSmallBarrage.lastCalled > seqSmallBarrage.cooldown) { |
| 1093 | return seqSmallBarrage(); |
| 1094 | } |
| 1095 | |
| 1096 | if (rand < 0.1) { |
| 1097 | return seqPyramid(); |
| 1098 | } |
| 1099 | |
| 1100 | if (rand < 0.6 && !IS_HEADER) { |
| 1101 | return seqRandomShell(); |
| 1102 | } else if (rand < 0.8) { |
| 1103 | return seqTwoRandom(); |
| 1104 | } else if (rand < 1) { |
| 1105 | return seqTriple(); |
| 1106 | } |
| 1107 | } |
| 1108 | |
| 1109 | let activePointerCount = 0; |
| 1110 | let isUpdatingSpeed = false; |
no test coverage detected