public async Task <IActionResult> Edit(int id, [Bind("RoleSkinID,NameRoleSkin")] RoleSkin roleSkin) { if (id != roleSkin.RoleSkinID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(roleSkin); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RoleSkinExists(roleSkin.RoleSkinID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(roleSkin)); }
public virtual void DeadEffect() { if (this is Role) { RoleSkin skin = GetSkin() as RoleSkin; Vector3 pos = Vector3.zero; GameObject posgo = GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos); if (posgo != null) { pos = posgo.transform.position; } pos.z = 1.5f; //SkillEffects._instance.LoadEffect("effect/prefab/", "2000231",pos,1f); GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "2000231", pos, BattleEnvironmentM.GetLifeMBornNode(true)); GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f); gae.AddAction(ndEffect); } else if (this is Building) { Vector3 pos = GetPos(); pos.y += 1.5f; GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "2000271", pos, BattleEnvironmentM.GetLifeMBornNode(true)); GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f); gae.AddAction(ndEffect); } }
public override void StartHitByBuild() { RoleSkin skin = m_Skin as RoleSkin; if (skin != null) { skin.ShowAngerEffect(false); } }
public async Task <IActionResult> Create([Bind("RoleSkinID,NameRoleSkin")] RoleSkin roleSkin) { if (ModelState.IsValid) { _context.Add(roleSkin); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(roleSkin)); }
public override void Finish() { base.Finish(); RoleSkin skin = m_Skin as RoleSkin; if (skin != null) { skin.ShowAngerEffect(true); } Transform t = m_Skin.tRoot; t.localScale = new Vector3(1, 1, 1); }
public override void DeadEffect() { RoleSkin skin = m_Skin as RoleSkin; GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos); Vector3 pos = posgo.transform.position; pos.z = 1.5f; GameObject go = null; GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "2000811", pos, BattleEnvironmentM.GetLifeMBornNode(true)); GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(2f); gae.AddAction(ndEffect); go = gae.gameObject; }
public GridActionCmdFly100003(Life Parent, List <Vector3> pos, float speed, int ModelType) : base(Parent, pos, speed, ModelType) { // Debug.Log("GridActionCmdFly100003"); RoleSkin r = m_Skin as RoleSkin; if (r != null) { GameObject posgo = r.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.LeftHandPos); if (posgo != null) { RolePropertyM rp = posgo.GetComponentInChildren <RolePropertyM>(); if (rp != null) { r.ChangeState(AnimatorState.Fly00000); } } } r.EnableColider(true); }
public void CreateSkin(Transform parent, int roleType, string roleName, AnimatorState aniState, bool isplayer) { m_Skin = new RoleSkin(); m_Skin.CreateSkin(parent, roleType, roleName, aniState, isplayer); }