コード例 #1
0
    void MoveInteract(Ray mouse, RaycastHit point)
    {
        if (Physics.Raycast(mouse, out point))
        {
            //if hits something

            //Debug.Log("hit something");
            Collider objCollider = point.collider;

            if (objCollider.GetComponent <Tile>())
            {
                //hover over tile
                //set short character UI

                Tile tile = objCollider.GetComponent <Tile>();
                if (tile.IsTargetable && Input.GetMouseButtonDown(0))
                {
                    _battleCam.CameraFullStop();
                    GridHandler.DijkstraMove(_timeRef.GetCurrentTurnCharacter, tile);
                }
            }
        }
    }