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

namespace entity
{
    public class Player : Entity
    {
        [SerializeField]
        private float m_RotationSpeed = 10.0f;

        private static int m_Score = 0;

        public static int Score { get { return m_Score; } set { m_Score = value; } }

        void OnTriggerEnter(Collider collision)
        {
            GameObject collider = collision.gameObject;
            if(collider.tag == "Asteroid" || collider.tag == "Enemy")
            {
                Lives = Lives - 1;
            }
        }

        override protected void OnDeath()
        {
            UnityEngine.SceneManagement.SceneManager.LoadScene("GameOver", UnityEngine.SceneManagement.LoadSceneMode.Single);
        }

        // Update is called once per frame
        override protected void UpdateEntity()
        {
            UpdateInput();
        }

        private void UpdateInput()
        {
            if(Input.GetKey(KeyCode.UpArrow))
            {
                float rotation = transform.rotation.eulerAngles.z;
                Vector3 acceleration = Vector3.zero;

                acceleration.x -= Mathf.Sin(Mathf.Deg2Rad * rotation);
                acceleration.y += Mathf.Cos(Mathf.Deg2Rad * rotation);

                m_Acceleration += acceleration * 10.0f;
            }

            if (Input.GetKey(KeyCode.RightArrow))
            {
                transform.Rotate(0.0f, 0.0f, -Time.deltaTime * m_RotationSpeed);
            }

            if (Input.GetKey(KeyCode.LeftArrow))
            {
                transform.Rotate(0.0f, 0.0f, Time.deltaTime * m_RotationSpeed);
            }

            if(Input.GetKey(KeyCode.F))
            {
                FireWeapons();
            }
        }
    }
}<commit_msg>changed fire key from f to space bar<commit_after>﻿using UnityEngine;
using System.Collections.Generic;

namespace entity
{
    public class Player : Entity
    {
        [SerializeField]
        private float m_RotationSpeed = 10.0f;

        private static int m_Score = 0;

        public static int Score { get { return m_Score; } set { m_Score = value; } }

        void OnTriggerEnter(Collider collision)
        {
            GameObject collider = collision.gameObject;
            if(collider.tag == "Asteroid" || collider.tag == "Enemy")
            {
                Lives = Lives - 1;
            }
        }

        override protected void OnDeath()
        {
            UnityEngine.SceneManagement.SceneManager.LoadScene("GameOver", UnityEngine.SceneManagement.LoadSceneMode.Single);
        }

        // Update is called once per frame
        override protected void UpdateEntity()
        {
            UpdateInput();
        }

        private void UpdateInput()
        {
            if(Input.GetKey(KeyCode.UpArrow))
            {
                float rotation = transform.rotation.eulerAngles.z;
                Vector3 acceleration = Vector3.zero;

                acceleration.x -= Mathf.Sin(Mathf.Deg2Rad * rotation);
                acceleration.y += Mathf.Cos(Mathf.Deg2Rad * rotation);

                m_Acceleration += acceleration * 10.0f;
            }

            if (Input.GetKey(KeyCode.RightArrow))
            {
                transform.Rotate(0.0f, 0.0f, -Time.deltaTime * m_RotationSpeed);
            }

            if (Input.GetKey(KeyCode.LeftArrow))
            {
                transform.Rotate(0.0f, 0.0f, Time.deltaTime * m_RotationSpeed);
            }

            if(Input.GetKey(KeyCode.Space))
            {
                FireWeapons();
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.0943448275862069, 'fraction_numerical': 0.011034482758620689, 'mean_word_length': 1.5571227080394923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6693687', 'n_tokens_mistral': 1032, 'n_tokens_neox': 968, 'n_words': 193}