Question by
Akuerle · Aug 18, 2017 at 02:46 PM ·
error-cs1525
Ayuda, tengo este error: ,Assets/Scripts/PlayerController.cs(18,77): error CS1525: Unexpected symbol `)', expecting `,' or `;' Aquí está mi script:
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class PlayerController : MonoBehaviour {
public GameObject game;
private Animator animator;
// Use this for initialization
void Start () {
animator = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
bool gamePlaying = game.GetComponent<GameController>().gameState == GameState.Playing
if (gamePlaying && (Input.GetKeyDown("up") || Input.GetMouseButtonDown(0))){
UpdateState ("PlayerJump");
}
}
public void UpdateState(string state = null){
if (state != null){
animator.Play(state);
}
}
void OnTriggerEnter2D(Collider2D other){
if (other.gameObject.tag == "Enemy") {
Debug.Log ("Me muero! >:v");
UpdateState ("PlayerDie");
game.GetComponent<GameController>().gameState = GameState.Ended;
}
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612133021im_/https://answers.unity.com/themes/thub/images/avi.jpg)