예제 #1
0
 void Awake()
 {
     //画面解像度を設定
     //Screen.SetResolution(1920,1080, false, 60);
     //Screen.SetResolution(960,600, false, 60);
     normalSpeed  = Time.timeScale;
     scoreText    = GameObject.Find("ScoreText").gameObject.GetComponent <Text>();
     playerScript = GameObject.Find("_Player").GetComponent <PlayerScript>();
     score        = 0;
     colorFilter  = filter;
     state        = CONTROL.GUI;
     gui.enabled  = false;
     gameover     = false;
     mainCamera   = cam;
     slowSpeed    = slow;
     goalCanvas   = goal;
 }
예제 #2
0
        public ActionResult EliminarRegistroControl(ControlModels modelo)
        {
            try
            {
                MantenimientosBL mantenimientosBL = new MantenimientosBL();
                var     config         = new MapperConfiguration(cfg => { cfg.CreateMap <ControlModels, CONTROL>(); });
                IMapper iMapper        = config.CreateMapper();
                CONTROL modeloEliminar = iMapper.Map <ControlModels, CONTROL>(modelo);
                mantenimientosBL.EliminarControl(modeloEliminar);

                return(RedirectToAction("ListaRegistroControl", new { modelo.IDCITA }));
            }
            catch (Exception)
            {
                throw;
            }
            return(View(modelo));
        }
예제 #3
0
        public ActionResult Registrar(ControlModels control)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var              config           = new MapperConfiguration(cfg => { cfg.CreateMap <ControlModels, CONTROL>(); });
                    IMapper          iMapper          = config.CreateMapper();
                    CONTROL          controlNuevo     = iMapper.Map <ControlModels, CONTROL>(control);
                    MantenimientosBL mantenimientosBL = new MantenimientosBL();
                    mantenimientosBL.RegistrarControl(controlNuevo);
                    control = new ControlModels();
                }
            }
            catch (Exception)
            {
                throw;
            }


            return(View(control));
        }
예제 #4
0
    public override void Trigger(ProtagController protag, CONTROL button)
    {
        switch (button)
        {
        case CONTROL.BBUTTON:
            switch (Items.GetItem(index).iLoc)
            {
            case ILOC.BEACH:
            case ILOC.FOREST:
            case ILOC.VOID:
            case ILOC.HOUSE:
                protag.SetHold(index);
                Items.GetItem(index).SetLocation(ILOC.HAND);
                SetAttachPoint(Vector3.zero, protag.attachBone, protag);
                break;

            case ILOC.HAND:
                break;
            }
            break;
        }
    }
예제 #5
0
 public ActionResult EditarRegistroControl(ControlModels modelo)
 {
     try
     {
         if (ModelState.IsValid)
         {
             MantenimientosBL mantenimientosBL = new MantenimientosBL();
             var     config       = new MapperConfiguration(cfg => { cfg.CreateMap <ControlModels, CONTROL>(); });
             IMapper iMapper      = config.CreateMapper();
             CONTROL modeloEditar = iMapper.Map <ControlModels, CONTROL>(modelo);
             mantenimientosBL.EditarControl(modeloEditar);
             modelo.estado = true;
             ModelState.Clear();
             ViewBag.Correcto = true;
             return(RedirectToAction("ListaRegistroControl", new { modelo.IDCITA }));
         }
     }
     catch (Exception)
     {
         throw;
     }
     return(View(new ControlModels()));
 }
예제 #6
0
 static void ControlSpeed()
 {
     focus = CONTROL.Speed;
 }
예제 #7
0
 static void ControlPower()
 {
     focus = CONTROL.Power;
 }
예제 #8
0
파일: Items.cs 프로젝트: kgrav/mouse-island
 public void OnInteract(ProtagController protag, CONTROL ctl, Interactive target)
 {
 }
예제 #9
0
 public abstract void Trigger(ProtagController protag, CONTROL button);
예제 #10
0
 public virtual void UseItemOn(CONTROL button, Items.Item item)
 {
 }
예제 #11
0
    protected IEnumerator OnChangeSelect(CONTROL _control)
    {
        mIsControl = false;

        switch (_control)
        {
        case CONTROL.RIGHT:
            if ((mCurrentPropertyIndx + 1) % mPropertyOffset.x == 0)
            {
                mCurrentPropertyIndx -= (int)(mPropertyOffset.x - 1);
            }
            else
            {
                mCurrentPropertyIndx += 1;
            }
            break;

        case CONTROL.LEFT:
            if (mCurrentPropertyIndx % mPropertyOffset.x == 0 || mCurrentPropertyIndx == 0)
            {
                mCurrentPropertyIndx += (int)(mPropertyOffset.x - 1);
            }
            else
            {
                mCurrentPropertyIndx -= 1;
            }
            break;

        case CONTROL.UP:
            if (mCurrentPropertyIndx - mPropertyOffset.x < 0)
            {
                mCurrentPropertyIndx += (int)((mPropertyOffset.y - 1) * mPropertyOffset.x);
            }
            else
            {
                mCurrentPropertyIndx -= (int)mPropertyOffset.x;
            }
            break;

        case CONTROL.DOWN:
            if (mCurrentPropertyIndx + mPropertyOffset.x > mPropertys.Count - 1)
            {
                mCurrentPropertyIndx -= (int)((mPropertyOffset.y - 1) * mPropertyOffset.x);
            }
            else
            {
                mCurrentPropertyIndx += (int)mPropertyOffset.x;
            }
            break;
        }

        var limitTime = 0.1f;
        var countTime = 0f;

        while (limitTime > countTime)
        {
            countTime += Time.deltaTime;
            mSelectImage.transform.position = Vector3.Lerp(mSelectImage.transform.position, mPropertys[mCurrentPropertyIndx].transform.position, 0.5f);

            yield return(null);
        }
        mSelectImage.transform.position = mPropertys[mCurrentPropertyIndx].transform.position;

        mIsControl = true;
        yield return(null);
    }