Пример #1
0
    //Upon entering state set timer and calculate scatter positions
    public override void EnterState(FSMAgent agent)
    {
        agent.SetTimer(7f);

        GraphNode g = HW3NavigationHandler.Instance.NodeHandler.ClosestNode(scatterPosition);

        realScatterPosition = g.Location;
        agent.SetTarget(realScatterPosition);
        Vector3 innerPosition = Vector3.Lerp(Vector3.zero, realScatterPosition, 0.8f);

        realInnerPosition = HW3NavigationHandler.Instance.NodeHandler.ClosestNode(innerPosition + Vector3.left * realScatterPosition.x / 3 + Vector3.down * realScatterPosition.y / 6).Location;
    }
 //EnterState Start timer for scatter state and find the blinky ghost if it exists
 public override void EnterState(FSMAgent agent)
 {
     agent.SetTimer(20f);
     blinky = GameObject.FindObjectOfType <Blinky>();
 }
Пример #3
0
 //Upon entering state, set timer to enter Scatter State
 public override void EnterState(FSMAgent agent)
 {
     agent.SetTimer(20f);
 }
 //Upon entering state, set timer to enter Scatter State
 public override void EnterState(FSMAgent agent)
 {
     agent.SetTimer(10f);
     agent.SetSpeedModifierNormal();
 }
 //Upon entering state, set timer to enter Scatter State
 public override void EnterState(FSMAgent agent)
 {
     agent.SetTimer(2f);
     agent.SetSpeedModifierDouble();
 }
Пример #6
0
 //Upon entering state, set timer to enter Scatter State
 public override void EnterState(FSMAgent agent)
 {
     agent.SetTimer(5f);
     agent.SetSpeedModifierHalf();
 }
 //Upon entering state, start a timer, set speed modifier to half, and set up animations
 public override void EnterState(FSMAgent agent)
 {
     agent.SetAnimationStateFrightened();
     agent.SetSpeedModifierHalf();
     agent.SetTimer(12);
 }