private void ShowRelicsObj() { DRelics db = ReadCfgRelics.GetDataById(centerID); if (mRender == null) { mRender = ERender.AddRender(mModelTexture); } mRender.DelAllModels(); mModel = mRender.AddModel(db.Model); if (mModel == null) { return; } mModel.SetActive(true); DStage ds = ReadCfgStageRelics.GetDataById(centerID); mModel.transform.localPosition = new Vector3(ds.X, ds.Y, ds.Z); mModel.transform.localEulerAngles = new Vector3(0, 180, 0); mModel.transform.localScale = Vector3.one; GameObject effect = GTWorld.Instance.Ect.LoadEffectObj(db.ActiveEffectID); if (effect == null) { return; } mRender.AddModel(effect); effect.transform.parent = mModel.transform; effect.transform.localPosition = Vector3.zero; effect.transform.localRotation = Quaternion.identity; effect.transform.localScale = Vector3.one; }
public async Task <ActionResult <DStage> > PostDStage(DStage dStage) { _context.Stage.Add(dStage); await _context.SaveChangesAsync(); return(CreatedAtAction("GetDStage", new { id = dStage.Id }, dStage)); }
public async Task <IActionResult> PutDStage(int id, DStage dStage) { if (id != dStage.Id) { return(BadRequest()); } _context.Entry(dStage).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DStageExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
private void InitModel() { DActor db = ReadCfgActor.GetDataById(selectID); mRender = ERender.AddRender(modelTexture); mRender.DelAllModels(); mAvatar = GTWorld.Instance.AddAvatar(db.Model); mAvatar.PlayAnim("idle", null); GameObject model = mRender.AddModel(mAvatar.GetRootObj()); DStage ds = ReadCfgStagePartner.GetDataById(selectID); model.transform.localPosition = new Vector3(ds.X, ds.Y, ds.Z); model.transform.localEulerAngles = new Vector3(0, 180, 0); model.transform.localScale = Vector3.one * ds.Scale * 0.3f; }
private void ShowModel() { DActor db = ReadCfgActor.GetDataById(mSelectMountID); if (db == null) { mRender = ERender.DelRender(mRender); return; } if (mRender == null) { mRender = ERender.AddRender(modelTexture); } mRender.DelAllModels(); mAvatar = GTWorld.Instance.AddAvatar(db.Model); mAvatar.PlayAnim("idle", null); GameObject model = mRender.AddModel(mAvatar.GetRootObj()); DStage ds = ReadCfgStageMount.GetDataById(mSelectMountID); model.transform.localPosition = new Vector3(ds.X, ds.Y, ds.Z); model.transform.localEulerAngles = new Vector3(0, 120, 0); model.transform.localScale = Vector3.one * ds.Scale * 1.2f; }