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

◆ DryadPortalKnock()

void Terraria.Cinematics.DD2Film.DryadPortalKnock ( FrameEventData evt)
inlineprivate

Definition at line 160 of file DD2Film.cs.

161 {
162 //IL_004f: Unknown result type (might be due to invalid IL or missing references)
163 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
164 if (_dryad != null)
165 {
166 if (evt.Frame == 20)
167 {
168 _dryad.velocity.Y -= 7f;
169 _dryad.velocity.X -= 8f;
170 SoundEngine.PlaySound(3, (int)_dryad.Center.X, (int)_dryad.Center.Y);
171 }
172 if (evt.Frame >= 20)
173 {
174 _dryad.ai[0] = 1f;
175 _dryad.ai[1] = evt.Remaining;
176 _dryad.rotation += 0.05f;
177 }
178 }
179 if (_ogre != null)
180 {
181 if (evt.Frame > 40)
182 {
183 _ogre.target = Main.myPlayer;
184 _ogre.direction = 1;
185 return;
186 }
187 _ogre.direction = -1;
188 _ogre.ai[1] = 0f;
189 _ogre.ai[0] = Math.Min(40f, _ogre.ai[0]);
190 _ogre.target = 300 + _dryad.whoAmI;
191 }
192 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 Center
Definition Entity.cs:70
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
float[] ai
An array with 4 slots used for any sort of data storage, which is occasionally synced from the server...
Definition NPC.cs:997

References Terraria.Cinematics.DD2Film._dryad, Terraria.Cinematics.DD2Film._ogre, Terraria.NPC.ai, Terraria.Entity.Center, Terraria.Main.myPlayer, Terraria.Audio.SoundEngine.PlaySound(), and Terraria.Entity.whoAmI.

Referenced by Terraria.Cinematics.DD2Film.DD2Film().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: