示例#1
0
    private void Awake()
    {
        // So no warnings get thrown
        player_FD_state  = Four_Directions_State.Directions.NONE;
        player_RPS_state = Rock_Paper_Scissors.Signs.NONE;
        line.origin      = transform.position;

        turn_controller = GetComponent <Turn_Script>();
    }
    void Awake()
    {
        Player       = GetComponent <Component>();
        playerCam    = Player.GetComponent <Camera_Script>();
        player_state = playerCam.player_RPS_state;

        AI_Opponent = GetComponent <Component>();
        AI          = AI_Opponent.GetComponent <AI_Behaviour>();
        AI_signs    = AI.hand;

        rock_paper_scissor = true;
        directions_state   = false;
        reset();
    }
    void State_Change()
    {
        switch (state)
        {
        case AI.AI_State.RPS:
            hand = rps.RandomSigns();
            break;

        case AI.AI_State.ACHI_MITE_HOI:
            four_points.RandomDirection();
            break;

        default:
            break;
        }
    }
示例#4
0
 // Controls for the Rock, Paper, Scissors state
 private void RPS_controls()
 {
     if (Input.GetKeyDown(KeyCode.W))
     {
         player_RPS_state = Rock_Paper_Scissors.Signs.ROCK;
     }
     if (Input.GetKeyDown(KeyCode.A))
     {
         player_RPS_state = Rock_Paper_Scissors.Signs.PAPER;
     }
     if (Input.GetKeyDown(KeyCode.D))
     {
         player_RPS_state = Rock_Paper_Scissors.Signs.SCISSORS;
     }
     else
     {
         player_RPS_state = Rock_Paper_Scissors.Signs.NONE;
     }
 }