public void ConfirmSkillLaunch() { if (ActiveConfirmationSkill.CanUse() && GetOwner().CanCastSkill(ActiveConfirmationSkill)) { ActiveConfirmationSkill.Start(Target); } }
/// <summary> /// Spusti i-tý skill hrace (vola se po stisknuti klavesy 1-5) /// </summary> /// <param name="key">1-5</param> public void LaunchSkill(int key) { // select the skill mapped to the key Skill skill = player.Skills.GetSkill(key - 1); if (skill == null) { Debug.Log("NPE nemuzu najit skill " + key); return; } #if UNITY_ANDROID if (ActiveConfirmationSkill != null && ActiveConfirmationSkill.Equals(skill)) { ActiveConfirmationSkill.AbortCast(); return; } #endif //Debug.Log("Launching skill... " + skill.Name); //MovementChanged(); // cast this skill player.CastSkill(skill); }
public override void Update() { // if the player is waiting to confirm skill casting, call the skills method to render the confirmation elements (eg. arrow to select where the skill should be casted, etc) if (ActiveConfirmationSkill != null) { ActiveConfirmationSkill.OnBeingConfirmed(); } // updatnout pohyb base.Update(); }
public void SetPlayersMoveToTarget(GameObject newTarget) { AbortMeleeAttacking(); if (!allowMovePointChange) { return; } if (ActiveConfirmationSkill != null && ActiveConfirmationSkill.MovementBreaksConfirmation) { ActiveConfirmationSkill.AbortCast(); } SetMovementTarget(newTarget); }
public void StartMeleeTargeting(bool rightClick) { if (ActiveConfirmationSkill != null && !ActiveConfirmationSkill.Equals(GetOwner().MeleeSkill)) { BreakCasting(); if (rightClick) { return; } } if (GetOwner().MeleeSkill != null && GetOwner().CanCastSkill(GetOwner().MeleeSkill)) { GetOwner().MeleeSkill.DoAutoattack(); } }
public bool SetPlayersMoveToTarget(Vector3 newTarget) { AbortMeleeAttacking(); CheckSkillsToAbort(); if (!allowMovePointChange) { return(false); } if (Utils.IsNotAccessible(GetBody().transform.position, newTarget)) { return(false); } if (ActiveConfirmationSkill != null && ActiveConfirmationSkill.MovementBreaksConfirmation) { ActiveConfirmationSkill.AbortCast(); } return(SetMovementTarget(newTarget)); }
public void ConfirmSkillLaunch(Vector3 mousePosition) { ActiveConfirmationSkill.Start(mousePosition); }