Skip to content

Instantly share code, notes, and snippets.

@AndrewWeston9
Created October 6, 2017 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewWeston9/8aa4773bde3efbbea18d17bcf2ce4a6b to your computer and use it in GitHub Desktop.
Save AndrewWeston9/8aa4773bde3efbbea18d17bcf2ce4a6b to your computer and use it in GitHub Desktop.
PlayerMove.cs Snippet: Adjustment of currently accessed block type for placing by the player.
/// Change the currentBlockType
if (Input.GetKey (KeyCode.Alpha1))
{
currentBlockType = 1;
}
if (Input.GetKey (KeyCode.Alpha2))
{
currentBlockType = 2;
}
if (Input.GetKey (KeyCode.Alpha3))
{
currentBlockType = 3;
}
if (Input.GetKey (KeyCode.Alpha4))
{
currentBlockType = 4;
}
if (Input.GetKey (KeyCode.Alpha0))
{
currentBlockType = 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment