Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddWavingNPC()

void Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer.AddWavingNPC ( int npcType,
Vector2 sceneAnchoePosition,
int lookDirection,
int fromTime,
int duration,
int timeToJumpAt )
inlineprivate

Definition at line 233 of file CreditsRollComposer.cs.

234 {
235 int num = 0;
236 float num2 = 4f;
237 float num3 = 0.2f;
238 float num4 = num2 * 2f / num3;
239 int num5 = NPCID.Sets.AttackType[npcType] * 6 + npcType % 13 * 2 + 20;
240 int num6 = 0;
241 if (npcType % 7 != 0)
242 {
243 num6 = 0;
244 }
245 bool num7 = npcType == 663 || npcType == 108;
246 bool flag = false;
247 if (num7)
248 {
249 num6 = 180;
250 }
251 int num8 = 240;
252 int num9 = lookDirection;
253 int num10 = -1;
254 int duration2 = 0;
255 switch (npcType)
256 {
257 case 54:
258 case 107:
259 case 227:
260 case 229:
261 case 353:
262 case 550:
263 case 663:
264 num9 *= -1;
265 break;
266 }
267 if ((uint)(npcType - 207) <= 2u || npcType == 228 || (uint)(npcType - 368) <= 1u)
268 {
269 flag = true;
270 }
271 switch (npcType)
272 {
273 case 107:
274 num10 = 0;
275 break;
276 case 208:
277 num10 = 127;
278 break;
279 case 353:
280 num10 = 136;
281 break;
282 case 54:
283 num10 = 126;
284 break;
285 case 368:
286 num10 = 15;
287 break;
288 case 229:
289 num10 = 85;
290 break;
291 }
292 if (num10 != -1)
293 {
294 duration2 = npcType % 6 * 20 + 60;
295 }
296 int num11 = duration - timeToJumpAt - num - num8;
298 if (flag)
299 {
301 }
303 .Then(new Actions.NPCs.MoveWithAcceleration(new Vector2(0f, 0f - num2), new Vector2(0f, num3), (int)num4))
304 .With(new Actions.NPCs.Move(new Vector2(0f, 1E-05f), (int)num4))
305 .Then(new Actions.NPCs.Wait(num11 - 90 + num5))
306 .Then(new Actions.NPCs.Wait(90 - num5));
307 if (num6 > 0)
308 {
310 }
312 if (npcType == 663)
313 {
315 }
316 if (num10 != -1)
317 {
319 }
321 }
AnimationSegmentWithActions< T > Then(IAnimationSegmentAction< T > act)
Definition Segments.cs:94
void AddEmote(Vector2 sceneAnchoePosition, int fromTime, int duration, int blinkTime, int emoteId, int direction)
static int[] AttackType
Definition NPCID.cs:4228

References Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer._originAtBottom, Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer._segments, System.Collections.Generic.List< T >.Add(), Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer.AddEmote(), Terraria.ID.NPCID.Sets.AttackType, System.E, Terraria.GameContent.Animations.Segments.AnimationSegmentWithActions< T >.Then(), and Microsoft.Xna.Framework.Graphics.Vector2.

Referenced by Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer.PlaySegment_PrincessAndEveryoneThanksPlayer().