public override async void HandleGameplayCue(GameObject Target, EGameplayCueEventTypes EventType, GameplayCueParameters Parameters) { Time.timeScale = 0.5f; await UniTask.DelayFrame(5); Time.timeScale = 1; var gameObject = Instantiate(ObjectToSpawn); gameObject.transform.SetParent(Target.transform); gameObject.transform.localPosition = Position; gameObject.transform.localRotation = Rotation; gameObject.transform.localScale = Scale; if (DestroyInSeconds > 0) { await UniTask.Delay(TimeSpan.FromSeconds(DestroyInSeconds)); GameObject.DestroyImmediate(gameObject); } }
public abstract void HandleGameplayCue(GameObject Target, EGameplayCueEventTypes EventType, GameplayCueParameters Parameters);
public override void Execute(GameObject Target, EGameplayCueEventTypes EventType, GameplayCueParameters Parameters) { GameplayCueImplementation.HandleGameplayCue(Target, EventType, Parameters); }