public void Init() { keys = GetComponent <KeyBinding>(); keys.Init(); moveVector = new Vector3(0, 0, 0); normalSpeed = gameObject.GetComponent <PlayerStats>().moveSpeed; currentSpeed = normalSpeed; onUnitLook = gameObject.GetComponent <OnUnitLook>(); onUnitLook.SetTarget(mousePos); _dashTime = 0; _afterDash = 0; moveState = MoveState.Nope; onAttack.Init(); attackCon = onAttack.GetAttackState(); }
void Start() { keys = GetComponent <KeyBinding>(); keys.Init(); moveVector = new Vector3(0, 0, 0); d_currentSpeed = currentSpeed; //onUnitLook = gameObject.AddComponent<OnUnitLook>(); onUnitLook = gameObject.GetComponent <OnUnitLook>(); onUnitLook.SetTarget(mousePos); time_dashTime = 0; time_afterDash = 0; dashCon = Dash.Nope; onAttack.Init(); attackCon = onAttack.GetAttackState(); }