Beispiel #1
0
    private void FixedUpdate()
    {
        FindSkinnedRender();

        // 현재 실행중인 애니메이션을 핼프 모션에서 멈추기
        if (0 < _playerInfo.playerHp && _playerInfo.playerHp <= 1)
        {
            _playerInfo.isStatue     = true;
            _playerInfo.isStopMoving = true;

            // 석상이 되었다면 텍스쳐를 돌처럼 바꾼다.
            StartCoroutine(StatueAniDuration());
        }
        else
        {
            _playerInfo.isStatue = false;
            // 다시 움직이려면 다른 조건이 필요함.
            //_playerInfo.isStopMoving = false;

            // 석상이 아니라면 텍스쳐를 원래대로 되돌린다.
            playerMaterial             = MATERIAL.ELEMENT1;
            playerAnimatorChange.speed = 1.0f;
        }

        playerAnimatorChange.SetBool("IsStatue", _playerInfo.isStatue);
        ChangeMaterial(playerMaterial);
    }
        public ActionResult Details(string id)
        {
            int pagina_id = 662; //ID EN BASE DE DATOS

            FnCommon.ObtenerConfPage(db, pagina_id, User.Identity.Name, this.ControllerContext.Controller);
            try
            {
                string p = Session["pais"].ToString();
                ViewBag.pais = p + ".png";
            }
            catch
            {
                //return RedirectToAction("Pais", "Home");
            }

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MATERIAL mATERIAL = db.MATERIALs.Find(id);

            if (mATERIAL == null)
            {
                return(HttpNotFound());
            }
            return(View(mATERIAL));
        }
        private void Save()
        {
            try
            {
                var Material = _MaterialRepo.GetById(id);
                if (id > 0 && Material != null)
                {
                    Material.NAME    = txtName.Value;
                    Material.NOTE    = txtNote.Value;
                    Material.UNIT_ID = Utils.CIntDef(ddlUnit.SelectedValue);

                    _MaterialRepo.Update(Material);
                }
                else
                {
                    Material         = new MATERIAL();
                    Material.NAME    = txtName.Value;
                    Material.NOTE    = txtNote.Value;
                    Material.UNIT_ID = Utils.CIntDef(ddlUnit.SelectedValue);

                    _MaterialRepo.Create(Material);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                Response.Redirect("nguyen-lieu.aspx");
            }
        }
Beispiel #4
0
        protected void Continuar(object sender, EventArgs e)
        {
            ASPxButton boton = (ASPxButton)sender;
            Control    main  = boton.Parent;

            ASPxListBox list = (ASPxListBox)main.FindControl("ASPxListBox1");

            if (list.Items.Count == 0)
            {
                return;
            }

            SOLICITUD_COMPRA compra = new SOLICITUD_COMPRA();

            compra.E_ID     = 1;
            compra.SC_FECHA = DateTime.Now;
            CRUD_SolicitudCompra.Create(compra);

            int id_compra = (Int32)CRUD_SolicitudCompra.getEnd().SC_ID;

            foreach (ListEditItem item in list.Items)
            {
                MATERIAL material = CRUD_Material.Read(item.Value.ToString(), 0);
                DETALLE_SOLICITUD_COMPRA detalle = new DETALLE_SOLICITUD_COMPRA();
                detalle.SC_ID        = id_compra;
                detalle.M_ID         = material.M_ID;
                detalle.DSC_CANTIDAD = material.M_STOCK_IDEAL - material.M_STOCK_REAL;

                CRUD_SolicitudCompraDetalle.Create(detalle);
            }

            Response.Redirect("SolicitudCompra.aspx", true);
        }
        protected void GRID_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            ASPxGridView grid          = (ASPxGridView)sender;
            ASPxTextBox  txtNombre     = (ASPxTextBox)grid.FindEditFormTemplateControl("ASPxNombre");
            ASPxListBox  cmbMateriales = (ASPxListBox)grid.FindEditFormTemplateControl("ASPxListBox");

            MATERIAL newKit = new MATERIAL();

            newKit.M_NOMBRE              = txtNombre.Text;
            newKit.M_TIPO                = "Kit";
            newKit.M_MEDIDA_COMPRA       = 1;
            newKit.M_MEDIDA_DISTRIBUCION = 1;
            newKit.M_STOCK_BAJO          = 1;
            newKit.M_STOCK_IDEAL         = 100;
            newKit.M_STOCK_REAL          = 0;

            CRUD_Material.Create(newKit);
            int kit_id = CRUD_Material.Read(newKit.M_NOMBRE);

            foreach (ListEditItem item in cmbMateriales.Items)
            {
                MATERIAL_KIT mat = new MATERIAL_KIT();
                mat.M_ID        = kit_id;
                mat.MAT_M_ID    = CRUD_Material.Read(item.Value.ToString());
                mat.MK_CANTIDAD = 1;

                CRUD_Kit.Create(mat);
            }

            e.Cancel = true;
            grid.CancelEdit();
        }
Beispiel #6
0
    IEnumerator StatueAniDuration()
    {
        yield return(new WaitForSeconds(aniStopTime));

        playerMaterial             = MATERIAL.ELEMENT2;
        playerAnimatorChange.speed = 0.0f;
    }
Beispiel #7
0
        public ActionResult DeleteConfirmed(string id)
        {
            MATERIAL mATERIAL = db.MATERIALs.Find(id);

            mATERIAL.ACTIVO = false;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #8
0
        public ActionResult DeleteConfirmed(short id)
        {
            MATERIAL material = db.MATERIALS.Find(id);

            db.MATERIALS.Remove(material);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #9
0
    private void Awake()
    {
        _playerInfo          = GetComponent <PlayerInfo>();
        childMeshRenderList  = GetComponentsInChildren <SkinnedMeshRenderer>();
        playerAnimatorChange = GetComponent <Animator>();
        playerMaterial       = MATERIAL.ELEMENT1;

        _playerMove = GetComponent <charactorMovingCamera>();
    }
Beispiel #10
0
 public void Add(MATERIAL entity)
 {
     try {
         materialS.Add(entity);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Beispiel #11
0
        //
        // GET: /Materials/Details/5

        public ActionResult Details(short id = 0)
        {
            MATERIAL material = db.MATERIALS.Find(id);

            if (material == null)
            {
                return(HttpNotFound());
            }
            return(View(material));
        }
        protected void Ingresar(object sender, EventArgs e)
        {
            ASPxButton boton = (ASPxButton)sender;
            Control    main  = boton.Parent;

            string encargado = "Bodega";
            Label  usuario   = (Label)main.Parent.Parent.FindControl("lblUsuario");

            if (usuario != null)
            {
                encargado = usuario.Text;
            }

            ASPxListBox  list      = (ASPxListBox)main.FindControl("ASPxListBox1");
            ASPxComboBox combo     = (ASPxComboBox)main.FindControl("ASPxComboBox1");
            string       id_compra = ASPxComboBox1.SelectedItem.Value.ToString();

            if (list.Items.Count == 0)
            {
                return;
            }

            SOLICITUD_COMPRA compra = CRUD_SolicitudCompra.Read(Int32.Parse(id_compra));

            RECEPCION_MATERIAL recepcion = new RECEPCION_MATERIAL();

            recepcion.RM_ENCARGADO_RECEPCION = encargado;
            recepcion.RM_FECHA = DateTime.Now;
            CRUD_RecepcionMaterial.Create(recepcion);

            int id_recep = (Int32)CRUD_RecepcionMaterial.getEnd().RM_ID;

            foreach (ListEditItem item in list.Items)
            {
                MATERIAL material = CRUD_Material.Read(Int32.Parse(item.GetValue("M_ID").ToString()));
                DETALLE_RECEPCION_MATERIAL detalle = new DETALLE_RECEPCION_MATERIAL();
                detalle.RM_ID        = id_recep;
                detalle.M_ID         = material.M_ID;
                detalle.DRM_CANTIDAD = Int32.Parse(item.GetValue("D_CANTIDAD").ToString());

                CRUD_RecepcionMaterialDetalle.Create(detalle);
            }

            compra.E_ID = 2;
            CRUD_SolicitudCompra.Update(compra);

            COMPRA_RECEPCION ligar = new COMPRA_RECEPCION();

            ligar.SC_ID = compra.SC_ID;
            ligar.RM_ID = id_recep;
            CRUD_CompraRecepcion.Create(ligar);

            Response.Redirect("~/RecepcionMaterial.aspx");
        }
Beispiel #13
0
 public static void Create(MATERIAL mat_new)
 {
     using (BODEXDataContext ctx = new BODEXDataContext())
     {
         mat_new.M_STOCK_IDEAL = 100;
         mat_new.M_STOCK_BAJO  = 1;
         mat_new.M_STOCK_REAL  = 0;
         ctx.ListaMaterial.InsertOnSubmit(mat_new);
         ctx.SubmitChanges();
     }
 }
Beispiel #14
0
        //
        // GET: /Materials/Edit/5

        public ActionResult Edit(short id = 0)
        {
            MATERIAL material = db.MATERIALS.Find(id);

            if (material == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MGSLNO = new SelectList(db.MATERIALSGROUPs, "MGSLNO", "MGROUPCODE", material.MGSLNO);
            ViewBag.MUSLNO = new SelectList(db.MEASUREMENTUNITs, "MUSLNO", "MUNAME", material.MUSLNO);
            return(View(material));
        }
 public virtual int Delete(int id)
 {
     try
     {
         MATERIAL cus = this.GetById(id);
         return(this.Delete(cus));
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Beispiel #16
0
 public ActionResult Edit(MATERIAL material)
 {
     if (ModelState.IsValid)
     {
         db.Entry(material).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MGSLNO = new SelectList(db.MATERIALSGROUPs, "MGSLNO", "MGROUPCODE", material.MGSLNO);
     ViewBag.MUSLNO = new SelectList(db.MEASUREMENTUNITs, "MUSLNO", "MUNAME", material.MUSLNO);
     return(View(material));
 }
 public virtual void Remove(MATERIAL cus)
 {
     try
     {
         db.MATERIALs.DeleteOnSubmit(cus);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Beispiel #18
0
        public static void Delete(MATERIAL mat_del)
        {
            using (BODEXDataContext ctx = new BODEXDataContext())
            {
                MATERIAL borrar = (from mat in ctx.ListaMaterial
                                   where mat.M_ID.Equals(mat_del.M_ID)
                                   select mat).First <MATERIAL>();

                ctx.ListaMaterial.DeleteOnSubmit(borrar);
                ctx.SubmitChanges();
            }
        }
 public virtual void Remove(int id)
 {
     try
     {
         MATERIAL cus = this.GetById(id);
         this.Remove(cus);
     }
     catch //(Exception e)
     {
         //throw new Exception(e.Message);
     }
 }
 public bool agregarmaterial(MATERIAL nuevo)
 {
     try
     {
         modelo.MATERIAL.Add(nuevo);
         return(modelo.SaveChanges() > 0);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public virtual void Create(MATERIAL cus)
 {
     try
     {
         this.db.MATERIALs.InsertOnSubmit(cus);
         db.SubmitChanges();
     }
     catch// (Exception e)
     {
         //throw new Exception(e.Message);
     }
 }
Beispiel #22
0
        public static MATERIAL ObtenerMaterial(TAT001Entities db, string user_id, string material_id)
        {
            string   spras_id = ObtenerSprasId(db, user_id);
            MATERIAL material = db.MATERIALs.Where(x => x.ID == material_id).FirstOrDefault();

            if (material.MATERIALTs.Any(x => x.SPRAS == spras_id))
            {
                MATERIALT mt = material.MATERIALTs.First(x => x.SPRAS == spras_id);
                material.MAKTX = mt.MAKTX;
                material.MAKTG = mt.MAKTG;
            }
            return(material);
        }
 public virtual void Update(MATERIAL cus)
 {
     try
     {
         MATERIAL cusOld = this.GetById(cus.ID);
         cusOld = cus;
         db.SubmitChanges();
     }
     catch //(Exception e)
     {
         //throw new Exception(e.Message);
     }
 }
 public virtual int Delete(MATERIAL cus)
 {
     try
     {
         //user.IsDelete = true;
         db.SubmitChanges();
         return(0);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Beispiel #25
0
 public ActionResult Edit([Bind(Include = "ID,MTART,MATKL_ID,MAKTX,MAKTG,MEINS,PUNIT,ACTIVO,CTGR,BRAND")] MATERIAL mATERIAL)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mATERIAL).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MATKL_ID = new SelectList(db.CATEGORIAs, "ID", "DESCRIPCION", mATERIAL.MATKL_ID);
     ViewBag.CTGR     = new SelectList(db.ZCTGRs, "ID_ZC", "DESCRIPCION", mATERIAL.CTGR);
     ViewBag.BRAND    = new SelectList(db.ZBRANDs, "ID_ZB", "Descripcion", mATERIAL.BRAND);
     ViewBag.MEINS    = new SelectList(db.UMEDIDAs, "MSEHI", "MSEHI", mATERIAL.MEINS);
     return(View(mATERIAL));
 }
Beispiel #26
0
        // GET: Materiales/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MATERIAL mATERIAL = db.MATERIALs.Find(id);

            if (mATERIAL == null)
            {
                return(HttpNotFound());
            }
            return(View(mATERIAL));
        }
 public bool Actualizarmaterial(MATERIAL nueva)
 {
     try
     {
         MATERIAL original = new MATERIAL();
         original          = modelo.MATERIAL.Find(nueva.ID_MATERIAL);
         original.CANTIDAD = nueva.CANTIDAD;
         return(modelo.SaveChanges() > 0);
     }
     catch (Exception)
     {
         return(false);
     }
 }
        public ActionResult Edit(string id)
        {
            int pagina_id = 664; //ID EN BASE DE DATOS

            FnCommon.ObtenerConfPage(db, pagina_id, User.Identity.Name, this.ControllerContext.Controller);

            try
            {
                string p = Session["pais"].ToString();
                ViewBag.pais = p + ".png";
            }
            catch
            {
                //return RedirectToAction("Pais", "Home");
            }

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MATERIAL mATERIAL = db.MATERIALs.Find(id);

            if (mATERIAL == null)
            {
                return(HttpNotFound());
            }
            if (mATERIAL.MATERIALTs.Count > 0)
            {
                foreach (var e in mATERIAL.MATERIALTs)
                {
                    if (e.SPRAS == "EN")
                    {
                        ViewBag.EN = e.MAKTX;
                    }
                    if (e.SPRAS == "ES")
                    {
                        ViewBag.ES = e.MAKTX;
                    }
                    if (e.SPRAS == "PT")
                    {
                        ViewBag.PT = e.MAKTX;
                    }
                }
            }
            else
            {
                ViewBag.EN = mATERIAL.MAKTX;
            }
            return(View(mATERIAL));
        }
        public ActionResult Edit([Bind(Include = "ID,MTART,MATKL_ID,MAKTX,MAKTG,MEINS,PUNIT,ACTIVO,CTGR,BRAND,MATERIALGP_ID,EN,ES,PT")] MATERIAL mATERIAL, FormCollection collection)
        {
            if (ModelState.IsValid)
            {
                MATERIAL mATERIAL1      = db.MATERIALs.Find(mATERIAL.ID);
                var      materialtextos = db.MATERIALTs.Where(t => t.MATERIAL_ID == mATERIAL.ID).ToList();
                db.MATERIALTs.RemoveRange(materialtextos);
                List <MATERIALT> ListmATERIALTs = new List <MATERIALT>();
                if (collection.AllKeys.Contains("EN"))
                {
                    if (!String.IsNullOrEmpty(collection["EN"]))
                    {
                        MATERIALT m = new MATERIALT {
                            SPRAS = "EN", MATERIAL_ID = mATERIAL.ID, MAKTX = collection["EN"], MAKTG = collection["EN"].ToUpper()
                        };
                        ListmATERIALTs.Add(m);
                    }
                    if (mATERIAL1.MAKTX != collection["EN"])
                    {
                        mATERIAL1.MAKTX = collection["EN"];
                        mATERIAL1.MAKTG = Convert.ToString(collection["EN"]).ToUpper();
                    }
                }
                if (collection.AllKeys.Contains("ES") && !String.IsNullOrEmpty(collection["ES"]))
                {
                    MATERIALT m = new MATERIALT {
                        SPRAS = "ES", MATERIAL_ID = mATERIAL.ID, MAKTX = collection["ES"], MAKTG = Convert.ToString(collection["ES"]).ToUpper()
                    };
                    ListmATERIALTs.Add(m);
                }
                if (collection.AllKeys.Contains("PT") && !String.IsNullOrEmpty(collection["PT"]))
                {
                    MATERIALT m = new MATERIALT {
                        SPRAS = "PT", MATERIAL_ID = mATERIAL.ID, MAKTX = collection["PT"], MAKTG = Convert.ToString(collection["PT"]).ToUpper()
                    };
                    ListmATERIALTs.Add(m);
                }
                db.MATERIALTs.AddRange(ListmATERIALTs);

                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            int pagina_id = 664; //ID EN BASE DE DATOS

            FnCommon.ObtenerConfPage(db, pagina_id, User.Identity.Name, this.ControllerContext.Controller);

            return(View(mATERIAL));
        }
Beispiel #30
0
    private static void LoadMaterialsInfo()
    {
        int CountMaterials = BinaryReader.ReadUInt16();

        for (int i = 0; i < CountMaterials; i++)
        {
            MATERIAL _4DSMaterial = CustomReader.ReadType <MATERIAL>();

            string ReflectionTexture = LoadReflectMaterial(); // Load Reflection Material Info
            string DiffuseTexture    = LoadDiffuseMaterial(); // Load Diffuse Material Info
            string OpacityTexture    = LoadOpacityMaterial(); // Load Opacity Material Info
            LoadAnimationMaterial();                          // Load Animation Material Info

            _4DSTextures.Add(DiffuseTexture);
        }
    }
Beispiel #31
0
 public Gun(string name, GUNTYPE guntype, MATERIAL material)
     : base("gun." + name, WEAPONTYPE.GUN, material)
 {
     _guntype = guntype;
 }
 public Pickaxe(string name, MATERIAL material)
     : base("tool.pickaxe." + name, TOOLTYPE.PICKAXE, material)
 {
 }
Beispiel #33
0
 public Bow(string name, BOWTYPE bowtype, MATERIAL material)
     : base("bow." + name, WEAPONTYPE.BOW, material)
 {
     _bowtype = bowtype;
 }
Beispiel #34
0
 public extern static void DllConvertEnergies(MATERIAL material);
 public Tool(string name, TOOLTYPE type, MATERIAL material)
     : base("tool." + name)
 {
     _tooltype = type;
         _material = material;
 }
 public Weapon(string name, WEAPONTYPE weapontype, MATERIAL material)
     : base("weapon." + name, TOOLTYPE.WEAPON, material)
 {
 }
Beispiel #37
0
 public Axe(string name, MATERIAL material)
     : base("axe." + name, TOOLTYPE.AXE, material)
 {
 }
 public Sword(string name, SWORDTYPE swordtype, MATERIAL material)
     : base("sword." + name, WEAPONTYPE.SWORD, material)
 {
     _swordtype = swordtype;
 }