Initial commit - Unity game project

This commit is contained in:
2026-01-31 15:24:24 +00:00
commit 76a067d1ba
145 changed files with 5925 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
using UnityEngine;
public class SimpleCrosshair : MonoBehaviour
{
[Header("Crosshair Settings")]
public Color crosshairColor = Color.white;
public float crosshairSize = 10f;
public float crosshairThickness = 2f;
void OnGUI()
{
// Calculate center of screen
float centerX = Screen.width / 2f;
float centerY = Screen.height / 2f;
// Set the crosshair color
GUI.color = crosshairColor;
// Draw horizontal line
GUI.DrawTexture(
new Rect(
centerX - crosshairSize / 2f,
centerY - crosshairThickness / 2f,
crosshairSize,
crosshairThickness
),
Texture2D.whiteTexture
);
// Draw vertical line
GUI.DrawTexture(
new Rect(
centerX - crosshairThickness / 2f,
centerY - crosshairSize / 2f,
crosshairThickness,
crosshairSize
),
Texture2D.whiteTexture
);
// Reset GUI color
GUI.color = Color.white;
}
}