public void dash(Charactercontral a) {//冲刺 Heathscrips health = gameObject.GetComponent <Heathscrips>(); if (a.GetStatenum() < 2 && (health == null || health.cando())) { animator.SetBool("dashing", true); move.setX(0); move.setY(0); contral = a; dashes = dashtime; //dash的时间设置为dashtime contral.Setstatenum(3); //技能状态 right = move.Turn(); if (health != null) { health.consumeqi(6); } } }
private bool jumping;//是否在自主跳跃的途中,用于判断是否会废气 private void Awake() { move = GetComponent <move>();//进行角色方向控制时就调用move中的函数 contral = GetComponent <Charactercontral>(); health = gameObject.GetComponent <Heathscrips>(); }
private void Awake() { weapons = GetComponentsInChildren <weaponscript>();//从子物体中获取武器 health = GetComponent <Heathscrips>(); contral = GetComponent <Charactercontral>(); }
private void Awake() { move = GetComponent <move>();//进行角色方向控制时就调用move中的函数 contral = GetComponent <Charactercontral>(); }