private IEnumerator TumbleEcho() { DashingTrail dt = Instantiate(weaver_tumble_trail); dt.owner = this; CmdDashTrail(); _skill2_can_echo = false; for (int i = 0; i < 5; i++) { Vector2 dir = Vector2.zero; if (Input.GetKey(KeyCode.W)) { dir += Vector2.up; } if (Input.GetKey(KeyCode.A)) { dir += Vector2.left; } if (Input.GetKey(KeyCode.S)) { dir += Vector2.down; } if (Input.GetKey(KeyCode.D)) { dir += Vector2.right; } dir = Vector2.ClampMagnitude(dir * 18, 18); GetComponent <Rigidbody2D>().velocity = dir; yield return(new WaitForSeconds(0.02f)); } GetComponent <Rigidbody2D>().velocity = Vector2.zero; ability_skill2.Use(); }
private IEnumerator Tumble() { // show trail DashingTrail dt = Instantiate(weaver_tumble_trail); dt.owner = this; CmdDashTrail(); for (int i = 0; i < 5; i++) { Vector2 dir = Vector2.zero; if (Input.GetKey(KeyCode.W)) { dir += Vector2.up; } if (Input.GetKey(KeyCode.A)) { dir += Vector2.left; } if (Input.GetKey(KeyCode.S)) { dir += Vector2.down; } if (Input.GetKey(KeyCode.D)) { dir += Vector2.right; } dir = Vector2.ClampMagnitude(dir * 18, 18); GetComponent <Rigidbody2D>().velocity = dir; yield return(new WaitForSeconds(0.02f)); } GetComponent <Rigidbody2D>().velocity = Vector2.zero; StartCoroutine(TumbleEchoCooldown()); }
private void RpcDashTrail() { if (player == Player.mine) { return; } DashingTrail dt = Instantiate(kam_butterfly_step_trail); dt.owner = this; }
private void RpcDashTrail() { if (player == Player.mine) { return; } DashingTrail dt = Instantiate(weaver_tumble_trail); dt.owner = this; }
private void RpcDashTrail() { if (player == Player.mine) { return; } DashingTrail dt = Instantiate(rockjaw_blitz); dt.owner = this; }
private IEnumerator Dash() { DashingTrail dt = Instantiate(rockjaw_blitz); dt.owner = this; CmdDashTrail(); StopCoroutine(primary.Reload()); primary.reload_percent = 100; primary.ammunition.Refill(); for (int i = 0; i < 4; i++) { Vector2 dir = Vector2.zero; if (Input.GetKey(KeyCode.W)) { dir += Vector2.up; } if (Input.GetKey(KeyCode.A)) { dir += Vector2.left; } if (Input.GetKey(KeyCode.S)) { dir += Vector2.down; } if (Input.GetKey(KeyCode.D)) { dir += Vector2.right; } dir = Vector2.ClampMagnitude(dir * 30, 30); GetComponent <Rigidbody2D>().velocity = dir; yield return(new WaitForSeconds(0.02f)); } GetComponent <Rigidbody2D>().velocity = Vector2.zero; }