Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
 public void BeforePlayerFelledOut(MarathonPlayerManager actor)
 {
     GetComponent <Collider>().enabled = false;
     playerFellOutPosition             = actor.GetPlayerPosition();
 }