public void OnExit(MarathonPlayerManager actor) { if (actor.State == MarathonPlayerManager.MarathonPlayerStatus.Falling) { return; } actor.SetPlayerState(MarathonPlayerManager.MarathonPlayerStatus.Running); actor.RecenterPlayerJoyCon(); actor.UpdateBridgeInfo(); }
public void OnEnter(MarathonPlayerManager actor) { if (actor.State != MarathonPlayerManager.MarathonPlayerStatus.Running) { return; } AudioManager.Instance.Play("HitWallBlock"); actor.SetPlayerState(MarathonPlayerManager.MarathonPlayerStatus.BeKnockedBack); }
public void OnEnter(MarathonPlayerManager actor) { if (actor.State != MarathonPlayerManager.MarathonPlayerStatus.Dashing) { actor.SetPlayerState(MarathonPlayerManager.MarathonPlayerStatus.BeKnockedBack); } AudioManager.Instance.Play("HitLogPile"); Instantiate(crashEffect, transform.position, Quaternion.identity); Destroy(gameObject); }
public void OnEnter(MarathonPlayerManager actor) { actor.SetPlayerState(MarathonPlayerManager.MarathonPlayerStatus.Dizzying); /// Bounce from player var randVect = UnityEngine.Random.onUnitSphere; if (randVect.y < 0.0f) { randVect = Vector3.Scale(randVect, Vector3.down); } // Ensure randVect is point front of player if (Vector3.Dot(randVect, actor.GetPlayerPosition()) < 0.0f) { randVect = Vector3.Scale(randVect, new Vector3(1.0f, 1.0f, -1.0f)); } moveDir = randVect.normalized; }
public void OnEnter(MarathonPlayerManager actor) { actor.SetPlayerState(MarathonPlayerManager.MarathonPlayerStatus.ReachGoal); OnPlayerReachGoal?.Invoke(); }
public void OnEnter(MarathonPlayerManager actor) { actor.SetPlayerState(MarathonPlayerManager.MarathonPlayerStatus.Dizzying); }
public void OnEnter(MarathonPlayerManager actor) { actor.SetPlayerState(MarathonPlayerManager.MarathonPlayerStatus.PassingBridge); actor.UpdateBridgeInfo(this); }