[英]Unity 2D, I can not resolve it
我尝试制作平台游戏,但是当我创建秋季动画时,它在以下位置向我显示了此错误CS1026: if(Player, whatIsGround == 0){
这是代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharacterAnim : MonoBehaviour {
private Animator anim;
public LayerMask whatIsGround;
public float Player;
void Start(){
anim = GetComponent<Animator>();
}
void Update(){
if(Player, whatIsGround == 0){
anim.SetBool("Test", true);
} else {
anim.SetBool("Test", false);
}
if(Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.LeftArrow)){
anim.SetBool("Left", true);
} else {
anim.SetBool("Left", false);
}
if(Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.RightArrow)){
anim.SetBool("Right", true);
} else {
anim.SetBool("Right", false);
}
if(Input.GetKeyDown(KeyCode.UpArrow)){
anim.SetTrigger("Jump");
}
}
}
我该如何解决?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.