예제 #1
0
    public static void ShiftViewRight()
    {
        Grid.Panel next = Grid.Panel.front;
        switch (currentlyViewingPanel)
        {
        case Grid.Panel.front:
            next = Grid.Panel.right;
            break;

        case Grid.Panel.right:
            next = Grid.Panel.back;
            break;

        case Grid.Panel.back:
            next = Grid.Panel.left;
            break;

        case Grid.Panel.left:
            next = Grid.Panel.front;
            break;
        }
        if (currentlyViewingPanel != Snake.snakeNodes[0].panel)
        {
            return;
        }
        currentlyViewingPanel = next;
        Time.timeScale        = 0f;
        panelToViewChanging   = true;
    }
예제 #2
0
 private void Start()
 {
     transform.position = playingPositionFront;
     transform.LookAt(lookAtPoint);
     transform.rotation              = Quaternion.Euler(90f, 0f, 0f);
     currentlyViewingPanel           = Grid.Panel.front;
     panelToViewChanging             = false;
     distanceFromLookAtPointToCamera = playingPositionFront.y - lookAtPoint.position.y;
     playingPositionBack             = new Vector3(lookAtPoint.position.x, lookAtPoint.position.y - distanceFromLookAtPointToCamera, lookAtPoint.position.z);
     playingPositionLeft             = new Vector3(lookAtPoint.position.x - distanceFromLookAtPointToCamera, lookAtPoint.position.y, lookAtPoint.position.z);
     playingPositionRight            = new Vector3(lookAtPoint.position.x + distanceFromLookAtPointToCamera, lookAtPoint.position.y, lookAtPoint.position.z);
 }
예제 #3
0
 public SingleNode(Grid.Panel _panel, int _x, int _z)
 {
     this.panel = _panel;
     this.x     = _x;
     this.z     = _z;
 }