コード例 #1
0
    void FireShotDestroyTile(Vector3 rayOrigin, Vector3 rayDirection)
    {
        Vector3 collisionPoint;

        if (CheckRay(rayOrigin, rayDirection, out collisionPoint))
        {
            WorldGrid grid = FindObjectOfType(typeof(WorldGrid)) as WorldGrid;
            grid.DestroyTile(collisionPoint);
        }
    }