Bonus fruit hitbox
This commit is contained in:
@@ -122,7 +122,7 @@ namespace Marro.PacManUdon
|
||||
|
||||
if (CrossesTileBorder(position, nextPosition, direction))
|
||||
{
|
||||
CheckNewTile(nextPosition);
|
||||
CheckNewTile(position, nextPosition);
|
||||
}
|
||||
|
||||
SetPosition(nextPosition);
|
||||
@@ -212,9 +212,9 @@ namespace Marro.PacManUdon
|
||||
return nextPosition;
|
||||
}
|
||||
|
||||
private void CheckNewTile(Vector2 position)
|
||||
private void CheckNewTile(Vector2 position, Vector2 nextPosition)
|
||||
{
|
||||
var pellet = pelletManager.CollectPelletAt(position);
|
||||
var pellet = pelletManager.EatAtTile(position, nextPosition);
|
||||
|
||||
if (pellet == PelletType.Pellet)
|
||||
{
|
||||
@@ -341,14 +341,6 @@ namespace Marro.PacManUdon
|
||||
UpdateAnimator();
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.gameObject.GetComponent<BonusFruit>())
|
||||
{
|
||||
gameManager.GotFruit();
|
||||
}
|
||||
}
|
||||
|
||||
public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
||||
{
|
||||
if (eventType != NetworkEventType.PacManTurn)
|
||||
|
||||
Reference in New Issue
Block a user