Insanely huge initial commit

This commit is contained in:
2026-02-21 16:40:15 -08:00
parent 2ba1c94b88
commit ee9aee0a1b
33825 changed files with 5213498 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Lofelt.NiceVibrations
{
public class BallPusher : MonoBehaviour
{
public float Force = 5f;
public BallDemoBall TargetBall;
protected Vector2 _direction;
protected virtual void OnTriggerEnter2D(Collider2D collider)
{
if (collider.gameObject != TargetBall.gameObject)
{
return;
}
_direction = (collider.transform.position - this.transform.position).normalized;
_direction.y = 1f;
collider.attachedRigidbody.velocity = Vector2.zero;
collider.attachedRigidbody.AddForce(_direction * Force);
TargetBall.HitPusher();
}
}
}