Я пытался сделать платформерную игру, но когда я создал анимацию падения, он показал мне эту ошибку 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");
}
}
}
Как можноя разрешаю это?