you really gotta calm down, marisa...

This commit is contained in:
Sylvia 2026-02-13 00:21:59 -08:00
parent 13bb58ea03
commit b9fb490dce
68 changed files with 990 additions and 44 deletions

View file

@ -0,0 +1,41 @@
using System;
using Core.Extensions;
using UnityEngine;
public class Projectile : MonoBehaviour
{
public float damage;
public float speed;
private int currentPierced;
public int pierceAmount;
public float lifetime;
[SerializeField] private Rigidbody2D rb;
public void RotateToTarget(Vector3 target)
{
transform.Lookat2D(target);
}
private void Start()
{
Destroy(gameObject, lifetime);
}
private void FixedUpdate()
{
rb.linearVelocity = transform.right * speed;
}
private void OnTriggerEnter2D(Collider2D other)
{
if (!other.CompareTag(tag) && other.TryGetComponent(out Entity isEntity))
{
isEntity.TakeDamage(damage);
currentPierced++;
if (currentPierced > pierceAmount)
{
Destroy(gameObject);
}
}
}
}

View file

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

View file

@ -0,0 +1,10 @@
using UnityEngine;
public class SpinSprite : MonoBehaviour
{
[SerializeField] private float rotationSpeed;
void Update()
{
transform.eulerAngles = new Vector3(0, 0, transform.eulerAngles.z + (rotationSpeed * Time.deltaTime));
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 367cdbe920b6609c2a25c4624980f56a