You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
812 B
27 lines
812 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class change : MonoBehaviour
|
|
{
|
|
private Animator m_Animator = null;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
m_Animator = GetComponent<Animator>();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
//if (Input.GetKeyDown(KeyCode.LeftArrow))
|
|
//m_Animator.SetInteger("ActionID", 1);
|
|
//if (Input.GetKeyDown(KeyCode.RightArrow))
|
|
// m_Animator.SetInteger("ActionID", 2);
|
|
if (Input.GetKeyDown(KeyCode.Space) | Input.GetKeyDown(KeyCode.DownArrow))
|
|
m_Animator.SetInteger("ID", 1);
|
|
if (Input.GetKeyUp(KeyCode.Space) | Input.GetKeyUp(KeyCode.DownArrow))
|
|
m_Animator.SetInteger("ID", 0);
|
|
}
|
|
}
|