예제 #1
0
 void registerPanel_KeyDown(dfControl control, dfKeyEventArgs keyEvent)
 {
     if (keyEvent.KeyCode == KeyCode.Return)
     {
         RegisterButton.DoClick();
     }
 }
예제 #2
0
 void dialogPanel_KeyDown(dfControl control, dfKeyEventArgs keyEvent)
 {
     if (keyEvent.KeyCode == KeyCode.Return)
     {
         DismissButton.DoClick();
     }
 }
예제 #3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Horizontal"))
     {
         if (Input.GetAxis("Horizontal") > 0)
         {
             NextButton.DoClick();
         }
         else
         {
             PrevPage();
         }
     }
 }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        Mission1.Click += new MouseEventHandler((sender, e) => MissionClick(sender, e, 1));
        Mission2.Click += new MouseEventHandler((sender, e) => MissionClick(sender, e, 2));
        Mission3.Click += new MouseEventHandler((sender, e) => MissionClick(sender, e, 3));
        Mission4.Click += new MouseEventHandler((sender, e) => MissionClick(sender, e, 4));
        Mission5.Click += new MouseEventHandler((sender, e) => MissionClick(sender, e, 5));

        DisableLockedMissions();
        //   MissionClick(null, null, Player.Level);
        // print("Clicking missions");
        // print("Player level: " + Player.Level);

        int mission = PlayerPrefs.GetInt(CURRENT_MISSION, 1);

        if (mission > Player.Level)
        {
            mission = Player.Level;
            PlayerPrefs.SetInt(CURRENT_MISSION, mission);
        }
        switch (mission)
        {
        case 1:
            Mission1.DoClick();
            // print("Clicking mission 1");
            break;

        case 2:
            Mission2.DoClick();
            // print("Clicking mission 2");
            break;

        case 3:
            Mission3.DoClick();
            // print("Clicking missions 3");
            break;

        case 4:
            Mission4.DoClick();
            // print("Clicking mission 4");
            break;

        case 5:
            // print("Clicking mission 5");
            Mission5.DoClick();
            break;
        }
    }
예제 #5
0
    private IEnumerator clickOnTrain()
    {
        yield return(new WaitForSeconds(0.10f));

        TrainButton.DoClick();
    }