Help I’m getting CS1519 for this code at (16,23) and (17,23) please help, here is the code,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.SceneManagement;
using Transform;
public class Movement : MonoBehaviour {
public float speed = 5f;
public Rigidbody2D rb;
public Vector2 move;
public float jumps = 1;
public float score = 0;
public Position.y = -70;
public Position.x = 161;
public TMP_Text scoretext;
// Start is called before the first frame
void Start()
{
move.x = 1;
move.y = 0;
}
// Update is called once per frame
void FixedUpdate()
{
//input
move.x = Input.GetAxisRaw("Horizontal");
if (Input.GetKey(KeyCode.Space) && jumps > 0)
{
move.y = 3;//jump force
jumps -= 1;
}
else
{
if (move.y > -1)
{
move.y -= 0.1f;//gravity
}
}
//movement
rb.MovePosition(rb.position + move * speed * Time.fixedDeltaTime);
}
void OnCollisionEnter2D(Collision2D col)
{
jumps = 1;
if (col.gameObject.tag == "coin")
{
Destroy(col.gameObject);
score += 1;
scoretext.text = "score=" + score.ToString();
}
if (col.gameObject.tag == "Jump_Pad")
{
move.y = 5;//jump force
Debug.Log(move.y);
speed = 10;
}
if (col.gameObject.tag == "Speed_Pad")
{
speed = 20;
Debug.Log(move.x);
}
if (col.gameObject.tag == "ground")
{
speed = 10;
}
if (col.gameObject.tag == "Ultra_Pad")
{
speed = 20;
move.y = 6;
}
if (col.gameObject.tag == "Death_Pad")
{
Transform.x == Position.x;
Transform.y == Position.y;
}
}
}