コード例 #1
0
    void MoveLeft()
    {
        GridLocation left = GridController.Left(location);

        if (left != null && GridController.CanWalkOn(left))
        {
            nextlocation = left;
        }
    }
コード例 #2
0
    void MoveDown()
    {
        GridLocation down = GridController.Below(location);

        if (down != null && GridController.CanWalkOn(down))
        {
            nextlocation = down;
        }
    }
コード例 #3
0
    void MoveRight()
    {
        GridLocation right = GridController.Right(location);

        if (right != null && GridController.CanWalkOn(right))
        {
            nextlocation = right;
        }
    }
コード例 #4
0
    void MoveUp()
    {
        GridLocation above = GridController.Above(location);

        if (above != null && GridController.CanWalkOn(above))
        {
            nextlocation = above;
        }
    }