Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (40 sloc) 1.12 KB
using UnityEngine;
using UnityEngine.Events;
using System.Collections;
public class ProjectileCreation : UnityEvent<ProjectileInfoPack>{
ProjectileInfoPack information;
}
public class SuperMoveAbility : UnityEvent<GameObject>
{
GameObject superMoveUser;
}
public class SpawnCharacters : UnityEvent<SpawningInformation> {
SpawningInformation spawnInformation;
}
public class EventManager : MonoBehaviour {
private static EventManager inst;
public static EventManager instance
{
get
{
if (inst == null)
{
var newEventManager = new GameObject("EventManager");
inst = newEventManager.AddComponent<EventManager>();
}
return inst;
}
}
public ProjectileCreation OnProjectileCreation = new ProjectileCreation();
public SuperMoveAbility OnSuperMove = new SuperMoveAbility();
public SpawnCharacters OnSpawnCharacter = new SpawnCharacters();
void Awake()
{
if(inst != null)
{
DestroyImmediate(this);
return;
}
inst = this;
}
}
You can’t perform that action at this time.