Last active
November 12, 2017 10:48
-
-
Save Tsumio/0d1cdb7f8010de9219f6106a1baf834b to your computer and use it in GitHub Desktop.
C#Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void MoveDownCursor() { | |
//this.CurrentNum = (this.CurrentNum + 1) % this.MaxMenuNum; -> これが直に計算した場合の方法 | |
this.CurrentNum = (int)Mathf.Repeat(++this.CurrentNum, this.MaxMenuNum); | |
} | |
private void MoveUpCursor() { | |
//this.CurrentNum = (this.CurrentNum + (MaxMenuNum-1)) % this.MaxMenuNum; -> これが直に計算した場合の方法 | |
this.CurrentNum = (int)Mathf.Repeat(--this.CurrentNum, this.MaxMenuNum); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment