public void Process(EntityBase entity, params object[] args) { if (entity.nextAtkID != 0) { entity.Attack(entity.nextAtkID); } else { if (entity.entityType == EntityType.Player) { entity.canReleaseSkill = true; } if (entity.GetCurrentDirInput() != Vector2.zero) { entity.Move(); entity.SetDir(entity.GetCurrentDirInput()); } else { entity.SetDir(Vector2.zero); entity.SetBlend(Constant.BlendIdle); } } //PECommon.Log("Process Idle"); }
public void Process(EntityBase entity, params object[] args) { if (entity.nextSkillID != 0) // 开始连招 { entity.Attack(entity.nextSkillID); } else { if (entity.entityType == EntityType.Player) { entity.canRlsSkill = true; } // 轮盘一直处于移动状态时,释放了技能后,尽管没有动轮盘,但依然需要他按照之前的方向移动 if (entity.GetDirInput() != Vector2.zero) { entity.Move(); entity.SetDir(entity.GetDirInput()); } else // 怪物,AI 驱动 { entity.SetBlend(Constants.BlendIdle); } } //PECommon.Log("Process StateIdle."); }
public void Process(EntityBase entity, params object[] args) { if (entity.nextSkillID != 0) { entity.Attack(entity.nextSkillID); } else { if (entity.entityType == EntityType.Player) { entity.canRlsSkill = true; } if (entity.GetDirInput() != Vector2.zero) { entity.Move(); // 手动设置方向来获取当前摇杆的偏移量来判断是否要移动 entity.SetDir(entity.GetDirInput()); } else { entity.SetBlend(Constants.BlendIdle); } //PECommon.Log("Process StateIdle"); } }
public void Process(EntityBase entityBase, params object[] args) { //Debug.Log(GetType() + "/Process()/ StateIdle "); // 判断有连招不 if (entityBase.nextSkillID != 0) { entityBase.Attack(entityBase.nextSkillID); } else { // 进入Idle 状态的时候可以释放技能了 if (entityBase.entityType == EntityType.Player) { entityBase.canRlsSkill = true; } // 判断有移动操作不 if (entityBase.GetCurDirInput() != Vector2.zero) { entityBase.Move(); entityBase.SetDir(entityBase.GetCurDirInput()); } else { entityBase.SetBlend(Constants.BlendIdle); } } }
private void OnTriggerEnter(Collider other) { EntityBase hit = other.GetComponent <EntityBase>(); if (!hit || hit.team != team) { if (PhotonNetwork.isMasterClient && hit) { owner.Attack(damageValue, hit, damageType); } StorBullet(); } }
public void Process(EntityBase entity, params object[] args) { if (entity.nextSkillID != 0) { Debug.Log("==========combo next"); entity.Attack((Orient)args[0], entity.nextSkillID); } else { entity.SetDir((Orient)args[0]); entity.SetAction(Constants.AniIdle); } }
public void Process(EntityBase entity, params object[] args) { if (entity.nextSkillID != 0) { entity.Attack(entity.nextSkillID); } else { if (entity.GetDirInput() != Vector2.zero) { entity.Move(); entity.SetDir(entity.GetDirInput()); } else { entity.SetBlend(Constants.BlendIdle); } //PECommon.Log("Process idle"); } }
public void Process(EntityBase entity, params object[] objs) { PECommon.Log("Process idle state."); if (entity.nextSkillID != 0) { entity.Attack(entity.nextSkillID); } else { if (entity.GetMoveDir() != Vector2.zero) { entity.Move(); entity.SetDir(entity.GetMoveDir()); } else { entity.SetBlend(0); } } }
public void DoState(EntityBase entity, params object[] args) { if (entity._nextSkillID != 0) { entity.Attack(entity._nextSkillID); } else { if (entity._entityType == Constants.EntityType.Player) { entity._bCanReleaseSkill = true; } if (entity.GetCurrentDirection() != Vector2.zero) { entity.Move(); entity.SetDirection(entity.GetCurrentDirection()); } else { entity.SetBlend(Constants.cBlendIdle); } } }
public void Process(EntityBase entity, params object[] args) { if (entity.NextSkillID != 0) { entity.Attack(entity.NextSkillID); } else { if (entity.entityType == EntityType.Player) { entity.CanRlsSkill = true; } if (entity.GetDirInput() != Vector2.zero) { entity.Move(); entity.SetDir(entity.GetDirInput()); } else { entity.SetBlend(Constants.BlendIdle); } } }