예제 #1
0
    // Use this for initialization
    void Start()
    {
        motor                 = GetComponent <Motor>();
        ghostPathFinder       = GetComponent <GhostPathFinder>();
        ghostScriptedMovement = GetComponent <GhostScriptedMovement>();
        ghostStateManager     = GetComponent <GhostStateManager>();
        animator              = GetComponent <Animator>();

        direction = Vector2.zero;
        move      = true;

        // Choose Pathfinder now, otherwise both will modify
        // the direction at the beginning.
        ChoosePathFinder();
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     pathFinder   = GetComponent <GhostPathFinder>();
     ghostManager = GetComponentInParent <GhostManager>();
 }
예제 #3
0
 void Start()
 {
     pacmanController  = pacman.GetComponent <PacmanController> ();
     pathFinder        = GetComponent <GhostPathFinder>();
     ghostStateManager = GetComponent <GhostStateManager>();
 }