Job.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
    void Update()
    {
        if (Input.GetKey(KeyCode.Alpha1))
          {
               if (s1_CD >= 3)
               {
                    facing = moveController.GetFacing();
                    s1 = Instantiate(skill1, transform.position, transform.rotation) as SkillOld;
                    s1.Init(facing);
                    s1_CD = 0;
               }
               //else
               //play error sound
          }
          if (Input.GetKey(KeyCode.Alpha2))
          {
               if (s2_CD >= 3)
               {
                    facing = moveController.GetFacing();
                    s2 = Instantiate(skill2, transform.position, transform.rotation) as SkillOld;
                    s2.Init(facing);
                    s2_CD = 0;
               }
          }
          if (Input.GetKey(KeyCode.Alpha3))
          {
               if (s3_CD >= 5)
               {
                    facing = moveController.GetFacing();
                    s3 = Instantiate(skill3, transform.position, transform.rotation) as SkillOld;
                    s3.Init(facing);
                    s3_CD = 0;
               }
          }

          s1_CD += Time.deltaTime;
          s2_CD += Time.deltaTime;
          s3_CD += Time.deltaTime;
          s4_CD += Time.deltaTime;
          s5_CD += Time.deltaTime;
    }

Usage Example

Beispiel #1
0
        public ActionResult Edit(JobInfo model, int jobid)
        {
            JobInfo jobinfo = Job.GetModelByJobID(jobid);

            if (jobinfo == null)
            {
                return(PromptView("信息不存在"));
            }

            if (ModelState.IsValid)
            {
                jobinfo.JobTitle = model.JobTitle;
                jobinfo.PubDate  = model.PubDate;
                jobinfo.EndDate  = model.EndDate;
                jobinfo.Number   = model.Number;
                jobinfo.State    = model.State;
                jobinfo.Body     = model.Body;
                jobinfo.City     = model.City;

                Job.Update(jobinfo);

                return(PromptView("信息修改成功!"));
            }

            return(View(model));
        }
All Usage Examples Of Job::Update