you really gotta calm down, marisa...
This commit is contained in:
parent
13bb58ea03
commit
b9fb490dce
68 changed files with 990 additions and 44 deletions
|
|
@ -1,24 +0,0 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class ItemPickup : MonoBehaviour
|
||||
{
|
||||
public bool inRange;
|
||||
[Header("Movement")]
|
||||
[SerializeField] private Rigidbody2D rb;
|
||||
[SerializeField] private float speed;
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (inRange)
|
||||
{
|
||||
rb.linearVelocity = (transform.position - AbilityManager.instance.player.transform.position).normalized * speed;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
//pick up
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue