temporary files rename
This commit is contained in:
parent
8e077e523c
commit
a87f0ed109
823 changed files with 20 additions and 5 deletions
|
@ -1,25 +0,0 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class Arrow : ProjectileHandler
|
||||
{
|
||||
[SerializeField] private float baseDamage;
|
||||
[SerializeField] private float baseKnockback;
|
||||
|
||||
void OnCollisionEnter(Collision collision)
|
||||
{
|
||||
// Can be optimized with tags, but it add dependance beetween teams
|
||||
if (collision.gameObject.TryGetComponent<AbstractUnit>(out AbstractUnit unit))
|
||||
{
|
||||
if (unit is MinecraftUnit && unit.IsTeamA != FromTeamA) // No friendly fire
|
||||
{
|
||||
MinecraftUnit minecraftUnit = unit as MinecraftUnit;
|
||||
Vector3 knockback = RigidBody.linearVelocity * baseKnockback;
|
||||
minecraftUnit.StartCoroutine(minecraftUnit.MovementHandler.TakeImpulse(knockback));
|
||||
}
|
||||
unit.TakeDamage(baseDamage);
|
||||
_minecraftUnitOrigin.Capacity.AddMana(baseDamage);
|
||||
}
|
||||
|
||||
Destroy(this.gameObject);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue