basically the whole game

This commit is contained in:
Sylvia 2026-07-09 04:59:48 -07:00
parent 949135cecb
commit 96dcfa9064
315 changed files with 34386 additions and 396 deletions

View file

@ -0,0 +1,42 @@
using System;
using UnityEngine;
public class DelayedAimShot : Projectile
{
[SerializeField] private float aimDelay;
[SerializeField] private float aimedSpeed;
[SerializeField] private float movementDelay;
private Vector3 GetAimedDirection()
{
return (WaveManager.instance.GetRandomPlayerPoint() - transform.position).normalized;
}
private void Update()
{
if (aimDelay > 0)
{
aimDelay -= Time.deltaTime;
if (aimDelay <= 0)
{
speed = aimedSpeed;
if (movementDelay <= 0)
{
direction = GetAimedDirection();
}
else
{
direction = Vector2.zero;
}
}
}
else if (movementDelay > 0)
{
movementDelay -= Time.deltaTime;
if (movementDelay <= 0)
{
direction = GetAimedDirection();
}
}
}
}