It’s been a while since I have done anything unity related, and now that i’ve gotten back into it I can’t figure out how and/or statements work. i’m pretty sure they are && and || but when I put them in my code it says they are an “unexpected symbol.” Has unity changed or am I just dumb?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CubeController : MonoBehaviour
{
public Rigidbody rb;
public float speed;
public float jumpSpeed;
void Start()
{
rb = GetComponent<Rigidbody> ();
}
void FixedUpdate()
{
rb.transform.Translate (Vector3.right * Time.deltaTime * speed);
if (Input.GetMouseButtonDown("0")) || (Input.GetButtonDown("Fire1")) {
rb.velocity = new Vector3 (0, jumpSpeed, 0);
}
}
}