Пример #1
0
    void handleCollideGhost(GameObject ghost)
    {
        Ghost ghostController = ghost.GetComponent <Ghost>();

        if (ghostController.getState() == Ghost.State.NORMAL)
        {
            LossGame();
        }
        else if (ghostController.getState() == Ghost.State.SCARED)
        {
            _killedGhostNum++;
            ghostController.BeKilled();
        }
    }