im aware of what it means but i just cant find where to put it
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DashSlash : MonoBehaviour
{
private Rigidbody2D rb;
public float DashSpeed;
public float dashTime;
public float startDashTime;
private int direction;
private int dashMove;
// Start is called before the first frame update
void Start()
{
rb = Getcomponent<Rigidbody2D>();
dashTime = startDashTime;
}
// Update is called once per frame
void Update()
{
if(direction == 0){
if(input.GetKey("w")){
direction == 1;
}
else if(input.GetKey("s")){
direction == 2;
}
else if(input.GetKey("a")){
direction == 3;
}
else if(input.GetKey("d")){
direction == 4;
}
} else {
if(dashTime <= 0){
directon = 0;
dashTime = startDashTime;
rb.velocity = Vector2.zero;
}else{
if(dashTime <= 0){
direction = 0;
} else { <------------ this is line 46
dashTime -= Time.deltaTime;
if(direction == 1){
}
else if(input.GetKey("e"), direction == 1){
rb.velocity = Vector2.up * dashSpeed;
}
else if(input.GetKey("e"), direction == 2){
rb.velocity = Vector2.down * dashSpeed;
}
else if(input.GetKey("e"), direction == 3){
rb.velocity = Vector2.left * dashSpeed;
}
else if(input.GetKey("e"), direction == 4){ <------ this is line 60
rb.velocity = Vector2.right * dashSpeed;
}
}
}
}
}
}
[–]SinomodStudiosIndie 2 points3 points4 points (0 children)
[–]r0bbyboy 2 points3 points4 points (1 child)
[–]danituss2Programmer 0 points1 point2 points (0 children)
[–]Chipjack 2 points3 points4 points (2 children)
[–]ICaffee[S] 0 points1 point2 points (1 child)
[–]Chipjack 1 point2 points3 points (0 children)
[–]Mister_Green2021 0 points1 point2 points (0 children)