コード例 #1
0
    void AssignGhosts()
    {
        clyde  = GameObject.Find("clyde");
        pinky  = GameObject.Find("pinky");
        inky   = GameObject.Find("inky");
        blinky = GameObject.Find("blinky");
        pacman = GameObject.Find("pacman");

        if (clyde == null || pinky == null || inky == null || blinky == null)
        {
            Debug.Log("One of ghosts are NULL");
        }
        if (pacman == null)
        {
            Debug.Log("Pacman is NULL");
        }

        gui = FindObjectOfType <GameUINavigation>();

        if (gui == null)
        {
            Debug.Log("GUI Handle Null!");
        }
    }
コード例 #2
0
 private void Start()
 {
     GM     = GameObject.Find("GameManager").GetComponent <GameManager>();
     GUINav = GameObject.Find("UIManager").GetComponent <GameUINavigation>();
     _dest  = transform.position;
 }