using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Move : MonoBehaviour
{   

    void Update()
    {
        if (Input.anyKeyDown)
            // Debug.Log("플레이어가 키를 눌렀습니다.");

        // 아무 입력 받으면 true 
        if (Input.anyKey)
            // Debug.Log("플레이어가 키를 누르고 있음.");

        /////////////////////////////////////////////////////////////
        /// 키보드 입력 
        /////////////////////////////////////////////////////////////
        // Return == enter임 
        // Esacpe == ESC
        if ( Input.GetKeyDown( KeyCode.Return ) )
            Debug.Log("아이템을 구입함.");

        // 키보드 입력 받으면 true 
        if (Input.GetKey(KeyCode.LeftArrow))
            Debug.Log("왼쪽으로 이동 중.");

        if (Input.GetKeyUp(KeyCode.RightArrow))
            Debug.Log("오른쪽 이동 멈춤.");

        /////////////////////////////////////////////////////////////
        /// 마우스 입력 
        /////////////////////////////////////////////////////////////
        /// 왼족 : 0 
        /// 오른쪽 : 1 
        if (Input.GetMouseButtonDown(0))
            Debug.Log("에네르기 발사");

        if (Input.GetMouseButton(0))
            Debug.Log("기 모으는 중");

        if (Input.GetMouseButtonUp(0))
            Debug.Log("초에네르기 발사");
    }


}
블로그 이미지

나무뚱이

,