<commit_before>﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace AssemblyCSharp
{
public class PlayerController : MonoBehaviour 
	{

	public Player player;
	
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		
	}
}
}<commit_msg>Added input checking for player controller<commit_after>﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace AssemblyCSharp
{

enum Directions {RIGHT,LEFT};

public class PlayerController : MonoBehaviour 
	{

	public Player player;
	public Transform playerTransform;
	
	public Direction lastDirection = RIGHT;


	// Use this for initialization
	void Start () 
	{
		playerTransform = GetComponenet<Transform>();
	}
	
	// Update is called once per frame
	void Update () 
	{
		checkForMovement()
		checkForInteraction()
	}


	private void checkForInteraction()
	{
		if (Input.GetKeyDown(KeyCode.Z))
		{
			Debug.Log("INTERACT BECAUSE Z");
		}
	}

	private void checkForAttack()
	{
		// if left mouse click
		if (Input.GetMouseButtonDown(0))
		{
			Debug.Log("Normal Attack");
		}
		// if right mouse click
		if (Input.GetMouseButtonDown(1))
		{
			Debug.Log("Special Attack");
		}
	}

	private void checkForMovement()
	{
		// axis basesd movement
		float verticalMovement = Input.getAxis("vertical");
	
		// change current facing direction - used to flip the sprite
		if (verticalMovement == 1)
		{
			lastDirection = Direction.RIGHT;
		}
		else if (verticalMovement == -1)
		{
			lastDirection = Direction.LEFT;
		}
			
		float horizontalMovement = Input.getAxis("horizontal");
		


		// normalized movement vector
		Vector3 movement = new Vector3(verticalMovement,horizontalMovement,0.0f).normalaized;
		// modifications to move speed
		float mods = player.speed * Time.deltaTime;
		movement *= mods;
		// translate the plaer position
		transform.Translate(movement);
		
	}
}
}
{'fraction_non_alphanumeric': 0.09907597535934291, 'fraction_numerical': 0.004106776180698152, 'mean_word_length': 3.6626794258373208, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7476952', 'n_tokens_mistral': 674, 'n_tokens_neox': 586, 'n_words': 158}