21 lines
525 B
C#
21 lines
525 B
C#
using SHADE;
|
|
using System;
|
|
public class ScoringZone : Script
|
|
{
|
|
|
|
protected override void awake()
|
|
{
|
|
}
|
|
|
|
protected override void onTriggerEnter(CollisionInfo info)
|
|
{
|
|
if (GameManager.Instance && info.GameObject.GetScript<Item>())
|
|
{
|
|
Audio.PlaySFXOnce2D("event:/Music/stingers/item_scored");
|
|
GameManager.Instance.ItemScored();
|
|
GameManager.Instance.Score += info.GameObject.GetScript<Item>().Score * GameManager.Instance.currMultiplierCombo;
|
|
info.GameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
} |