public void StopFade(AzumiEventType Event_Type, Component Sender, object Param = null) { StopAllCoroutines(); Color color = myImage.color; color.a = MaxOpacity; myImage.color = color; }
void OnEnterLevel(AzumiEventType azumiEventType, Component Sender, object Param = null) { if (musicEnabled) { AudioEventManager.PostEvent(AudioEventType.MainThemeFadeOut, this); AudioEventManager.PostEvent(AudioEventType.LevelThemeHardStart, this); AudioEventManager.PostEvent(AudioEventType.LossThemeFadeOut, this); } }
public void OnResetTimer(AzumiEventType Event_Type, Component Sender, object Param = null) { StopAllCoroutines(); Color color = myImage.color; color.a = 0; myImage.color = color; fadeAlreadyStarted = false; }
public void OnExitLevelEarly(AzumiEventType azumiEventType, Component Sender, object Param = null) { Dictionary <string, object> paramList = AddStandardParameters(new Dictionary <string, object>()); paramList.Add("Level", UnityEngine.SceneManagement.SceneManager.GetActiveScene().name); paramList.Add("Time", timerDict[AnalyticsEventType.StartLevel].GetElapsedTime()); Analytics.CustomEvent("Exit", paramList); //print("Analytics OnExitLevelEarly:" + Analytics.CustomEvent("Exit", paramList)); //OutputParams(azumiEventType.ToString(), paramList); }
public void StartFade(AzumiEventType Event_Type, Component Sender, object Param = null) { if (Sender == myWall && notExpiredAlready) { notExpiredAlready = false; fadeParticles.Play(); emission.enabled = true; StartCoroutine("FadeOut"); } }
public void OnGameShift(AzumiEventType Event_Type, Component Sender, object Param = null) { //print("ArrowSpriteRenderer " + ArrowSpriteRenderer ); if (!flickering) { flickering = true; } SetMarkerRotation((Vector3)Param); CalculateFlickerInterval(); }
public void StartFade(AzumiEventType Event_Type, Component Sender, object Param = null) { if (fadeDirection == FadeDirection.FadeIn) { StartCoroutine("FadeIn"); } else { StartCoroutine("FadeOut"); } }
public void onLevelPaused(AzumiEventType azumiEventType, Component Sender, object Param = null) { numberOfTimesPaused++; Dictionary <string, object> paramList = AddStandardParameters(new Dictionary <string, object>()); paramList.Add("Level", UnityEngine.SceneManagement.SceneManager.GetActiveScene().name); paramList.Add("Time", timerDict[AnalyticsEventType.StartLevel].GetElapsedTime()); paramList.Add("timesPaused", numberOfTimesPaused); Analytics.CustomEvent("Pause", paramList); //print("Analytics onLevelPaused:" + Analytics.CustomEvent("Pause", paramList)); // OutputParams(azumiEventType.ToString(), paramList); }
void OnCoinPickup(AzumiEventType Event_Type, Component Sender, object Param = null) { if (Sender == collectible) { Collider2D currentCollider = (Collider2D)Param; Vector3 currentDirection = currentCollider.attachedRigidbody.velocity.normalized; angleAxis = Vector3.Cross(currentDirection, Vector3.forward).normalized; StartPickupEffect(); } }
public void OnSaveSettings(AzumiEventType azumiEventType, Component Sender, object Param = null) { Dictionary <string, object> paramList = AddStandardParameters(new Dictionary <string, object>()); paramList.Add("NewMusic", SoundManager.MusicVolume); paramList.Add("NewFx", SoundManager.SoundFXVolume); paramList.Add("OldMusic", SoundManager.FormerMusicVolume); paramList.Add("OldFx", SoundManager.FormerSoundFXVolume); Analytics.CustomEvent("Settings", paramList); //print("Analytics OnSavedSettings:" + Analytics.CustomEvent("Settings", paramList)); //OutputParams(azumiEventType.ToString(), paramList); }
public void OnLockLevel(AzumiEventType Event_Type, Component Sender, object Param = null) { if (!LevelManager.GetPlayerLevelStatus(chapterNumber, levelNumber)) { lockIcon.Show(); highScoreText.enabled = false; button.interactable = false; whitePanel.SetActiveStatus(button.interactable); for (int i = 0; i < stars.Length; i++) { stars[i].Hide(); } } }
public void OnGamePress(AzumiEventType Event_Type, Component Sender, object Param = null) { //print ("ArrowPivot == " +; if (InputManager.MainDirectionSelected) { ArrowSpriteRenderer.sprite = MainSprite; } else { ArrowSpriteRenderer.sprite = AltSprite; } startLocation = Camera.main.ViewportToWorldPoint(FixCoordinates((Vector3)Param)); transform.position = startLocation; }
public void onLevelLost(AzumiEventType azumiEventType, Component Sender, object Param = null) { ScoreManager scoreManager = GameObject.Find("ScoreManager").GetComponent <ScoreManager>(); FPSDisplay fpsDisplay = GameObject.Find("SceneScripts").GetComponent <FPSDisplay>(); Dictionary <string, object> paramList = AddStandardParameters(new Dictionary <string, object>()); paramList.Add("Level", UnityEngine.SceneManagement.SceneManager.GetActiveScene().name); paramList.Add("NumPlays", LevelManager.Instance.GetTimesLevelPlayed()); paramList.Add("Time", timerDict[AnalyticsEventType.StartLevel].GetElapsedTime()); paramList.Add("result", scoreManager.GetReasonForLoss()); paramList.Add("Coins", scoreManager.CoinsEarned); paramList.Add("fps", fpsDisplay.GetAverageFPS()); Analytics.CustomEvent("Loss", paramList); // print("Analytics onLevelLost:" + Analytics.CustomEvent("Loss", paramList)); //OutputParams(azumiEventType.ToString(), paramList); }
public void onEnterLevel(AzumiEventType azumiEventType, Component Sender, object Param = null) { //reset pause count for new level numberOfTimesPaused = 0; AddNewTimerObject(AnalyticsEventType.StartLevel); Dictionary <string, object> paramList = AddStandardParameters(new Dictionary <string, object>()); paramList.Add("Level", UnityEngine.SceneManagement.SceneManager.GetActiveScene().name); paramList.Add("NumPlaysThisSession", LevelManager.Instance.GetTimesLevelPlayed()); paramList.Add("Wins", LevelManager.Instance.GetWins()); paramList.Add("Losses", LevelManager.Instance.GetLosses()); Analytics.CustomEvent("StartLevel", paramList); // print("Analytics onEnterLevel:" + Analytics.CustomEvent("StartLevel", paramList)); // OutputParams(azumiEventType.ToString(), paramList); }
public void OnPlayerActionEvent(AzumiEventType Event_Type, Component Sender, object Param = null) { if (sceneManager.GetCurrentState() == SceneState.Playing) { if (swipesRemaining > 0) { swipesRemaining--; doSwipesUpdate(); } else { EventManager.PostEvent(AzumiEventType.OutOfBounces, this); } } }
public void OnHitDoorEvent(AzumiEventType Event_Type, Component Sender, object Param = null) { if (!exitedDoorSafely) { exitedDoorSafely = true; if (NumberOfStars > 0) { EventManager.PostEvent(AzumiEventType.LevelWon, this); } else { EventManager.PostEvent(AzumiEventType.LevelLost, this); } } }
//----------------------------------------------------------- /// <summary> /// Function to add specified listener-object to array of listeners /// </summary> /// <param name="AzumiEventType">Event to Listen for</param> /// <param name="Listener">Object to listen for event</param> /// <remarks> /// This is an instance method. that is somewhat redundant with the static method ListenForEvent /// </remarks> public void AddListener(AzumiEventType azumiEventType, OnEvent Listener) { //List of listeners for this event List <OnEvent> ListenList = null; //New item to be added. Check for existing event type key. If one exists, add to list if (Listeners.TryGetValue(azumiEventType, out ListenList)) { //List exists, so add new item ListenList.Add(Listener); return; } //Otherwise create new list as dictionary key ListenList = new List <OnEvent>(); ListenList.Add(Listener); Listeners.Add(azumiEventType, ListenList); //Add to internal listeners list }
//--------------------------------------------------------- /// <summary> /// Remove a listener for a single type and target /// </summary> /// <param name="AzumiEventType">Event Type to remove</param> /// <param name="Listener">Listening Object to remove</param> /// <remarks> /// kills only the event for designated listener, leaving others untouched /// </remarks> public void RemoveListener(AzumiEventType azumiEventType, OnEvent Listener) { if (Listeners.ContainsKey(azumiEventType)) { List <OnEvent> tempList = new List <OnEvent>(); for (int i = 0; i < Listeners[azumiEventType].Count; i++) { if (Listeners[azumiEventType][i] == Listener) { //do nothing--this is the listener we want to eliminate } else { //add to new list which will short;y replace the old one tempList.Add(Listeners[azumiEventType][i]); } } Listeners[azumiEventType] = tempList; } }
//----------------------------------------------------------- /// <summary> /// Posts event to listeners /// </summary> /// <param name="azumiEventType">Event to invoke of type AzumiEventType</param> /// <param name="Sender">Object invoking event of type Component</param> /// <param name="Param">Optional argument of type Object</param> public void PostNotification(AzumiEventType azumiEventType, Component Sender, object Param = null) { //Notify all listeners of an event //List of listeners for this event only List <OnEvent> ListenList = null; //If no event entry exists, then exit because there are no listeners to notify if (!Listeners.TryGetValue(azumiEventType, out ListenList)) { return; } //Entry exists. Now notify appropriate listeners for (int i = 0; i < ListenList.Count; i++) { if (!ListenList[i].Equals(null)) //If object is not null, then send message via interfaces { ListenList[i](azumiEventType, Sender, Param); } } }
public void OnGameSwipe(AzumiEventType Event_Type, Component Sender, object Param = null) { Vector3 directionVector = (Vector3)Param; if (gamePointerDown && directionVector.magnitude != 0f) { //print ("OnGameSwipe " + directionVector); float currentMagnitude = Mathf.Clamp(directionVector.magnitude, MinimumMagnitude, MaximumMagnitude); float normalMagnitude = currentMagnitude / MaximumMagnitude; Vector3 normalVector = directionVector.normalized; //print ("vel " + Mathf.Clamp((normalMagnitude * MaximumVelocity), MinimumVelocity, MaximumVelocity)); myRb.velocity = normalVector * Mathf.Clamp((normalMagnitude * MaximumVelocity), MinimumVelocity, MaximumVelocity); /* * myRb.AddForce((Vector3)Param * onTapSpeed ); * myRb.velocity =Vector2.ClampMagnitude(myRb.velocity, clampSpeed); * gamePointerDown = false; */ } }
void disableBlurBackGround(AzumiEventType Event_Type, Component Sender, object Param = null) { myImage.enabled = false; }
void DisplayBlurBackgroundEvent(AzumiEventType Event_Type, Component Sender, object Param = null) { renderCamera.TakeScreenshot(0, 0, Screen.width, Screen.height); }
void enableBlurBackGround(AzumiEventType Event_Type, Component Sender, object Param = null) { GetScreen(); myImage.enabled = true; }
public void OnOutOfTime(AzumiEventType Event_Type, Component Sender, object Param = null) { ranOutOfTime = true; EventManager.PostEvent(AzumiEventType.LevelLost, this); }
public void OnOutOfBounces(AzumiEventType Event_Type, Component Sender, object Param = null) { EventManager.PostEvent(AzumiEventType.LevelLost, this); }
void onStartEndGameSequence(AzumiEventType azumiEventType, Component Sender, object Param = null) { StartCoroutine("Translate"); }
public void OnResetProgress(AzumiEventType Event_Type, Component Sender, object Param = null) { SetUpNewPlayerData(); WritePlayerLevelSettings(); }
public void OnLevelLost(AzumiEventType Event_Type, Component Sender, object Param = null) { LevelPlayerData currentLevelData = ChapterPlayerDataList[lastChapterNumber - 1].LevelPlayerDataList[lastLevelNumber - 1]; currentLevelData.Losses++; }
public void OnGameRelease(AzumiEventType Event_Type, Component Sender, object Param = null) { ArrowSpriteRenderer.enabled = false; }
public void Close(AzumiEventType Event_Type, Component Sender, object Param = null) { myWindowState = WindowState.closed; implementCurrentWindowState(); }