private bool CommonSkill(int index, bool isRaycast, bool isPlayingWhirlwind = false) { if (player.IsThrowAxe()) { return(false); } if (player.IsAvoid()) { return(false); } if (player.IsBuff()) { return(false); } if (player.IsDash()) { return(false); } if (player.IsBash()) { return(false); } if (player.IsWhirlwind()) { return(false); } if (UIManager.Instance.CoolTimes[index].fillAmount > 0) { return(false); } if (!player.IsWeaponEquiped) { player.EquipWeapon(true); } if (isRaycast) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit HitInfo; if (Physics.Raycast(ray, out HitInfo, 100f, player.Layer)) { Vector3 dest = HitInfo.point; player.Point.transform.position = dest; if (player.Point.parent) { player.ChangeShader(player.Point.parent.GetComponentsInChildren <SkinnedMeshRenderer>(), "Custom/DissolveShader"); player.Point.parent = null; } } else { return(false); } } if (isPlayingWhirlwind == false) { UIManager.Instance.CoolTimes[index].fillAmount = 1; StartCoroutine(UIManager.Instance.SkillCoolTime(index)); } return(true); }
public void InWeapon() { player.EquipWeapon(false); }