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; }
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); }
public SingleNode(Grid.Panel _panel, int _x, int _z) { this.panel = _panel; this.x = _x; this.z = _z; }