コード例 #1
0
    void randomNumber()
    {
        switch (ai_State)
        {
        case State.STATE.ROCK_PAPER_SCISSORS:
            ai_hands = (HandSigns.Signs)Random.Range(0, 2);
            break;

        case State.STATE.LOOK_OVER_THERE:
            ai_points = (Directions.Points)Random.Range(0, 3);
            break;
        }
    }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        // Default Start
        playerState       = State.STATE.ROCK_PAPER_SCISSORS;
        player_hands      = HandSigns.Signs.NONE;
        player_directions = Directions.Points.NONE;

        boxes    = new GameObject[4];
        boxes[0] = new GameObject("Up_Box");
        boxes[1] = new GameObject("Down_Box");
        boxes[2] = new GameObject("Right_Box");
        boxes[3] = new GameObject("Left_Box");

        line.origin = transform.position;
    }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     ai_State  = State.STATE.ROCK_PAPER_SCISSORS;
     ai_hands  = HandSigns.Signs.NONE;
     ai_points = Directions.Points.NONE;
 }
コード例 #4
0
 public void Scissors()
 {
     player_hands = HandSigns.Signs.SCISSORS;
 }
コード例 #5
0
 public void Paper()
 {
     player_hands = HandSigns.Signs.PAPER;
 }
コード例 #6
0
 // Rock Paper Scissors for player
 public void Rock()
 {
     player_hands = HandSigns.Signs.ROCK;
 }