Import 2D Level
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Platformer.Core;
|
||||
using Platformer.Mechanics;
|
||||
using Platformer.Model;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Platformer.Gameplay
|
||||
{
|
||||
/// <summary>
|
||||
/// Fired when a player collides with a token.
|
||||
/// </summary>
|
||||
/// <typeparam name="PlayerCollision"></typeparam>
|
||||
public class PlayerTokenCollision : Simulation.Event<PlayerTokenCollision>
|
||||
{
|
||||
public PlayerController player;
|
||||
public TokenInstance token;
|
||||
|
||||
PlatformerModel model = Simulation.GetModel<PlatformerModel>();
|
||||
|
||||
public override void Execute()
|
||||
{
|
||||
AudioSource.PlayClipAtPoint(token.tokenCollectAudio, token.transform.position);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user