I am new to scripting and I need help. It keeps on saying unexpected symbol void on the last statement.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerControler : MonoBehaviour {
//movement variables
public float maxSpeed;
Rigidbody2D myRB;
Animator myAnim;
bool facingRight;
// Use this for initialization
void Start () {
myRB = GetComponent ();
myAnim = GetComponent ();
facingRight = true;
}
// Update is called once per frame
void FixedUpdate () {
float move = Input.HetAxis (“Horizontal”);
myRB.velocity = new Vector2 (move * maxSpeed, myRB.velocity.y);
if(move>0&&!facingRight)(
flip()
) (move<0&&facingRight)( flip()
}
void flip(){
facingRight=!facingRight;
Vector3 theScale = transform.localScalel;
theScale.x *= -1;
transform.localScale = theScale;
}
}