public override void HandlerPointerUp(IInteractive interactive, InputData data) { VPlayer player = VPlayer.instance; player.SetTracingTarget(null); if (interactive is VBattle) { Vector3 point; if (this.GetGroundHitPoint(out point)) { if (this._decal != null) { this._decal.markToDestroy = true; this._decal = null; } Effect e = this.owner.battle.CreateEffect("e152"); point.y = 0.02f; e.position = point; this.MovePlayer(point); } } else { if (interactive is VBio bio && !bio.isDead) { if (VEntityUtils.IsAllied(player, bio) && bio != player && player.CanMove()) { FrameActionManager.SetFrameAction(new _DTO_action_info(VPlayer.instance.rid, ( byte )FrameActionType.Track, bio.rid)); } else { Vector3 position = data.currentRaycast.point; position.y = 0f; Skill skill = player.commonSkill; if (player.CanUseSkill(skill) && VEntityUtils.CanAttack(player, bio, skill.campType, skill.targetFlag)) { player.SetTracingTarget(bio); //普攻 FrameActionManager.SetFrameAction(new _DTO_action_info(player.rid, ( byte )FrameActionType.UseSkill, skill.id, player.rid, bio.rid, position.x, position.y, position.z)); } else { UIEvent.SkillUseFailed(player, skill, bio); } } }
public override void OnEnter(params object[] param) { this._skill = ( Skill )param[0]; UIEvent.PickSkill(this._skill); VPlayer player = VPlayer.instance; if (this._skill.castType != CastType.Immediately) { Vector3 position = player.direction * this._skill.distance + player.position; position.y = 0.02f; this._decal = this.owner.battle.CreateEffect("e151"); this._decal.position = position; } else { player.SetTracingTarget(null); if (player.CanUseSkill(this._skill)) { FrameActionManager.SetFrameAction(new _DTO_action_info(player.rid, ( byte )FrameActionType.UseSkill, this._skill.id, player.rid, this._skill.rangeType == RangeType.Single ? player.rid : string.Empty, player.position.x, player.position.y, player.position.z)); } this.owner.DropSkill(); } }