Exemplo n.º 1
0
    void Start()
    {
        instance       = this;
        onDebugChange += instance.debugInfo.setDebugState;
        getValuesFromConfig();

        if (!created && dontDestroyOnLoad)
        {
            DontDestroyOnLoad(this.gameObject);
            created = true;
            Debug.Log("Awake: " + this.gameObject);
        }
        Map.Setup(mapTexture, new Vector3(-1000, 0, -1000), new Vector3(1000, 0, 1000));
        gliderRig = glider.GetComponent <Rigidbody>();
        //ParagliderCrashDetection CrashDetect = glider.GetComponent<ParagliderCrashDetection>();
        glider.onCrash = onCrash;
        //glider.onFog = onFog;
        glider.onFinishReached = onLevelFinish;
        glider.onThermicDown   = onThermic;
        glider.onThermicUp     = onThermic;
        //glider.onThermicLeave = onThermicLeave;
        glider.onSpawn   = onSpawn;
        glider.onDocking = onDocking;
        levelControl     = GetComponent <ParagliderLevelControl>();
        gameReset();
    }
Exemplo n.º 2
0
        private void finish_button_MouseClick(object sender, MouseEventArgs e)
        {
            //将文本框中的角色信息存储刀数组中
            lackBox = lack_box_textBox.Text.Replace(" ", "").Split(new char[2] {
                ',', ','
            });
            //存储lackbox的信息
            Properties.Settings.Default.lackbox = lack_box_textBox.Text;
            Properties.Settings.Default.Save();
            //激活作业按钮
            boolDelegate changeTeamButton = new boolDelegate(Base_Form.base_form.enableTeamButton);

            changeTeamButton(true);
        }
Exemplo n.º 3
0
 private void EnableControls(bool enable)
 {
     if (btnCreate.InvokeRequired)
     {
         boolDelegate bD = new boolDelegate(EnableControls);
         this.Invoke(bD, new object[] { enable });
     }
     else
     {
         btnCreate.Enabled       = enable;
         gbEvernoteLogin.Enabled = enable;
         gbSaveTo.Enabled        = enable;
         gbExport.Enabled        = enable;
     }
 }
Exemplo n.º 4
0
        private void save_button_MouseClick(object sender, MouseEventArgs e)
        {
            if (teamworks.Count < 3)
            {//作业数量检测
                MessageBox.Show("请给出3队以上作业", "", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
                return;
            }
            string tempTeams   = "";
            string tempDamages = "";
            string tempRemarks = "";

            for (int i = 0; i < teams_listBox.Items.Count; i++)
            {
                if (i != 0)
                {
                    tempTeams   += "*";
                    tempDamages += "*";
                    tempRemarks += "*";
                }
                tempTeams   += teamworks[i].team;
                tempDamages += teamworks[i].damage.ToString();
                tempRemarks += teamworks[i].remark;
            }
            Properties.Settings.Default.teams   = tempTeams;
            Properties.Settings.Default.damages = tempDamages;
            Properties.Settings.Default.remarks = tempRemarks;
            Properties.Settings.Default.Save();
            //激活生成界面
            boolDelegate changePlanbutton = new boolDelegate(Base_Form.base_form.enablePlanButton);

            changePlanbutton(true);
            //激活生成按钮
            boolDelegate changeCreatebutton = new boolDelegate(PlanCreate.planCreate.enableCreateButton);

            changeCreatebutton(true);
        }
Exemplo n.º 5
0
 public void SetBoostConstraint(boolDelegate bd, string name = "")
 {
     CheckBoostConstraint = bd;
     boostConstraintName = name;
 }
Exemplo n.º 6
0
Arquivo: Form1.cs Projeto: bvp/en2ki
 private void EnableControls(bool enable)
 {
     if (btnCreate.InvokeRequired)
     {
         boolDelegate bD = new boolDelegate(EnableControls);
         this.Invoke(bD, new object[] { enable });
     }
     else
     {
         btnCreate.Enabled = enable;
         gbEvernoteLogin.Enabled = enable;
         gbSaveTo.Enabled = enable;
         gbExport.Enabled = enable;
     }
 }