Initial commit

This commit is contained in:
2026-01-13 15:43:33 +00:00
commit 44ef19d058
4517 changed files with 1234348 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using StarterAssets;
using UnityEngine;
using UnityEngine.AI;
public class Drone : MonoBehaviour
{
FirstPersonController player;
NavMeshAgent agent;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Awake()
{
agent = GetComponent<NavMeshAgent>();
}
void Start()
{
player = FindFirstObjectByType<FirstPersonController>();
}
// Update is called once per frame
void Update()
{
agent.SetDestination(player.transform.position);
transform.LookAt(player.transform);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: dd94886ba21b8d54babb3b6e94f7859c

View File

@@ -0,0 +1,30 @@
using UnityEngine;
public class EnemyHealth : MonoBehaviour
{
[SerializeField] int maxHealth = 100;
int currentHealth;
void Awake()
{
currentHealth = maxHealth;
}
public void TakeDamage(int damage)
{
currentHealth -= damage;
if (currentHealth <= 0)
{
gameObject.SetActive(false);
}
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7607d877a899edd469640c39419addcd

View File

@@ -0,0 +1,27 @@
using StarterAssets;
using UnityEngine;
using UnityEngine.AI;
public class Robot : MonoBehaviour
{
[SerializeField] AnimationClip idle;
FirstPersonController player;
NavMeshAgent agent;
Animator animator;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Awake()
{
agent = GetComponent<NavMeshAgent>();
animator = GetComponent<Animator>();
}
void Start()
{
player = FindFirstObjectByType<FirstPersonController>();
}
// Update is called once per frame
void Update()
{
agent.SetDestination(player.transform.position);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e458434f24592374a81c633d2c9a29e8