asked
Unity Game Development (Unity 2D) - From Start to Deployment
Parameter Change
Written on
·
176
0
GetComponent().SetTrigger("Shoot_t");
float temp = GetComponent().GetFloat("HP_f");
GetComponent().SetFloat("HP_f", temp-10);
이렇게 해서 -10씩 줄어드는건 잘되는데 50아래로 내려가도 shoot으로 넘어가지는데 왜그런지 알 수 있을까요?
Answer 2
설정한 조건을 하나라도 만족하면 넘어 가는 것 같습니다.
조건 방식을 OR 가 아닌 AND로 설정할 순 없나요?
음 해당 애니메이터의 파라미터에 HP_f가 50보다 같거나 클때만 넘어가도록 조건을 설정해주시면 됩니다.