init commit

This commit is contained in:
2025-05-12 18:07:43 -07:00
commit b410345c18
1023 changed files with 57521 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
using System;
using Godot;
public partial class Bullet : RigidBody3D {
Reference _Reference;
Options _Options;
public int Creator = -1;
public float Damage = 1;
public override void _Ready() {
_Options = GetNode<Options>( "/root/Options" );
_Reference = GetNode<Reference>("/root/Reference");
}
public void _on_body_entered( Node body ) {
if (Multiplayer.GetUniqueId() == 1){
if ( body is Humanoid ) {
Humanoid player = (Humanoid)body;
_Reference.GameHandler.TakeDamage(Damage, Creator, Convert.ToInt32( player.Name.ToString().Split(new char[]{','})[0] ));
_Reference.Alert.PerformAlert("Bullet his player with ID: " + body.GetMultiplayerAuthority());
}
}
this.QueueFree();
}
}