Question by
ManuelBarro · Mar 07, 2018 at 05:01 AM ·
scripting problemscript.variablevariables
Script error and no Variables showing
Greetings from Argentina, i am fascinated with Unity so i decided to start my first 2D project with little to none Scripting Exp. This is the script and i am desperately needing some help with this. I am currently using the script from a Video (link text). This is the Script itself:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player_0 : MonoBehaviour {
public int playerSpeed = 10;
public bool facingRight = true;
public int playerJumpPower = 1250;
public float moveX;
// Update is called once per frame
void Update () {
Player_0 ();
}
void PlayerMove(){
//CONTROLS
moveX = Input.GetAxis("Horizontal");
//ANIMATIONS
//PLAYER DIRECTION
if (moveX < 0.0f && facingRight == false) {
FlipPlayer ();
}
else if (moveX > 0.0f && facingRight == true) {
FlipPlayer ();
}
//PHYSICS
gameObject.GetComponent<Rigidbody2D>().velocity == new Vector2 (moveX * playerSpeed, gameObject.GetComponent<Rigidbody2D>().velocity.y);
}
void Jump() {
//JUMPING CODE
}
void FlipPlayer(){
}
}
I am currently using MonoDevelop as the main Scripting Tool
Comment