Exemple #1
0
    void Update()
    {
        Vector2 targetTile = this.transform.position;

        switch (ghostType)
        {
        case Ghost.BLINKY:
            targetTile = blinky.GetTargetTile();
            break;

        case Ghost.PINKY:
            targetTile = pinky.GetTargetTile();
            break;

        case Ghost.INKY:
            targetTile = inky.GetTargetTile();
            break;

        case Ghost.CLYDE:
            targetTile = clyde.GetTargetTile();
            break;
        }

        this.transform.position = gameBoard.BoardToWorld(targetTile);
    }