展前冒死重构
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public static class GameplayLevelRuleEventBus
|
||||
{
|
||||
public static event Action<int, string, float, NoteData> TapJudged;
|
||||
public static event Action<int, string, float, NoteData> HoldStarted;
|
||||
public static event Action<int, string, float, NoteData> HoldCompleted;
|
||||
public static event Action<int, string, float, NoteData> HoldBroken;
|
||||
public static event Action<int, float> AllySkillCast;
|
||||
public static event Action<EnemyCombatant, int, EnemyData_SO> EnemySpawned;
|
||||
public static event Action<EnemyCombatant, int, EnemyData_SO> EnemyDied;
|
||||
public static event Action<EnemyCombatant, float, GameObject> EnemyDamaged;
|
||||
public static event Action<EnemyCombatant> EnemyManaFull;
|
||||
|
||||
public static void NotifyTapJudged(int trackIndex, string result, float songTime, NoteData noteData)
|
||||
{
|
||||
TapJudged?.Invoke(trackIndex, result, songTime, noteData);
|
||||
}
|
||||
|
||||
public static void NotifyHoldStarted(int trackIndex, string result, float songTime, NoteData noteData)
|
||||
{
|
||||
HoldStarted?.Invoke(trackIndex, result, songTime, noteData);
|
||||
}
|
||||
|
||||
public static void NotifyHoldCompleted(int trackIndex, string result, float songTime, NoteData noteData)
|
||||
{
|
||||
HoldCompleted?.Invoke(trackIndex, result, songTime, noteData);
|
||||
}
|
||||
|
||||
public static void NotifyHoldBroken(int trackIndex, string result, float songTime, NoteData noteData)
|
||||
{
|
||||
HoldBroken?.Invoke(trackIndex, result, songTime, noteData);
|
||||
}
|
||||
|
||||
public static void NotifyAllySkillCast(int slotIndex, float songTime)
|
||||
{
|
||||
AllySkillCast?.Invoke(slotIndex, songTime);
|
||||
}
|
||||
|
||||
public static void NotifyEnemySpawned(EnemyCombatant enemy, int stageIndex, EnemyData_SO data)
|
||||
{
|
||||
EnemySpawned?.Invoke(enemy, stageIndex, data);
|
||||
}
|
||||
|
||||
public static void NotifyEnemyDied(EnemyCombatant enemy, int stageIndex, EnemyData_SO data)
|
||||
{
|
||||
EnemyDied?.Invoke(enemy, stageIndex, data);
|
||||
}
|
||||
|
||||
public static void NotifyEnemyDamaged(EnemyCombatant enemy, float actualDamage, GameObject source)
|
||||
{
|
||||
EnemyDamaged?.Invoke(enemy, actualDamage, source);
|
||||
}
|
||||
|
||||
public static void NotifyEnemyManaFull(EnemyCombatant enemy)
|
||||
{
|
||||
EnemyManaFull?.Invoke(enemy);
|
||||
}
|
||||
|
||||
public static bool ShouldPreventEnemyDeath(EnemyCombatant enemy)
|
||||
{
|
||||
return LevelRuleController.Instance != null && LevelRuleController.Instance.ShouldPreventEnemyDeath(enemy);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user