-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathStarObserver.cs
More file actions
43 lines (38 loc) · 1.27 KB
/
StarObserver.cs
File metadata and controls
43 lines (38 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using Terraria;
using Terraria.ModLoader;
namespace WeaponOut
{
/// <summary>
/// OUr mission? TO look up and watch the stars.
/// Mainly to test multiplayer bugs though.
/// </summary>
public class StarObserver : ModWorld
{
public override bool Autoload(ref string name)
{
return false;
}
public override void PostUpdate()
{
if (Main.time % 120 == 0)
{
Main.NewText("call");
System.Console.WriteLine("Firing Star");
Player player = Main.player[0];
Projectile.NewProjectile(player.Center.X, player.Center.Y - 100, player.velocity.X, 5f, 12, 1000, 10f, Main.myPlayer, 0f, 0f);
}
foreach (Projectile p in Main.projectile)
{
if(p.active && p.type == 12)
{
string message = "Falling Star seen at " +
p.Center.ToTileCoordinates().X +
", from pleyer" +
Main.player[0].Center.ToTileCoordinates().X;
System.Console.WriteLine(message);
Main.NewText(message);
}
}
}
}
}