/// <summary> /// Called when a .NET event that must be propagated to Flutter is raised. /// This method propagates the event through <see cref="OnPlatformEvent"/> /// so that <see cref="FlutnetBridge"/> can subscribe and send data to Flutter. /// </summary> private static void PropagatePlatformEvent(string serviceName, string eventName, object sender, EventArgs eventArgs) { OnPlatformEventArgs args = new OnPlatformEventArgs { ServiceName = serviceName, EventName = eventName, EventData = eventArgs }; OnPlatformEvent?.Invoke(sender, args); }
private void OnPlatform(Platform platform) { if (!GameManager.Instance.IsRun) { platform.RunBirdLandingEffect(); return; } if (isOnPlatform == false && TryBounce()) { platform.RunBirdLandingEffect(); OnPlatformEvent?.Invoke(platform); } isOnPlatform = true; availableJumps = maxJumps; }