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

public class Baby : SingletonMonoBehaviour<Baby> {

    public float ResetDuration = 1.5f;

	Animator _animator;
    Rigidbody2D Rigidbody2D;

    Quaternion NeutralRotation;
    Vector3 NeutralPosition;
    bool IsResetting = false;

	override protected void Awake() {
        base.Awake();

		if ( GetComponent<Animator>() != null ) {
			_animator = GetComponent<Animator>();
		}
		else {
			Debug.LogWarning( "Baby has no animator" );
		}

        Rigidbody2D = GetComponent<Rigidbody2D>();

        NeutralPosition = transform.position;
        NeutralRotation = transform.rotation;
	}

	public void Eat( EatableItem item ) {

		if ( _animator != null ) {

			_animator.SetTrigger( "eat" );
		}
	}

	public void React() {

		if ( _animator != null ) {

			_animator.SetTrigger( "emo" );
		}
	}

    public void Sleep()
    {
        Debug.Log("ZZZzzzzz");
    }

    public void WakeUp()<commit_msg>Select random Emotion / Idle animation<commit_after>﻿using NumericTypeExtensions;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Baby : SingletonMonoBehaviour<Baby> {

    public float ResetDuration = 1.5f;

    [SerializeField]
    int NumIdleAnimations = 6;
    [SerializeField]
    int NumEmotionAnimations = 3;

	Animator _animator;
    Rigidbody2D Rigidbody2D;

    Quaternion NeutralRotation;
    Vector3 NeutralPosition;
    bool IsResetting = false;

	override protected void Awake() {
        base.Awake();

		if ( GetComponent<Animator>() != null ) {
			_animator = GetComponent<Animator>();
		}
		else {
			Debug.LogWarning( "Baby has no animator" );
		}

        Rigidbody2D = GetComponent<Rigidbody2D>();

        NeutralPosition = transform.position;
        NeutralRotation = transform.rotation;
	}

    private void Update () {
        _animator.SetInteger( "RandomIdle", Random.Range( 0, NumIdleAnimations ) );
        _animator.SetInteger( "RandomEmotion", Random.Range( 0, NumEmotionAnimations ) );
    }

	public void Eat( EatableItem item ) {

		if ( _animator != null ) {

			_animator.SetTrigger( "Eat" );
		}
	}

	public void React() {

		if ( _animator != null ) {

			_animator.SetTrigger( "Emotion" );
		}
	}

    public void Sleep()
    {
        Debug.Log("ZZZzzzzz");
    }

    public void WakeUp()
{'fraction_non_alphanumeric': 0.1077819392426134, 'fraction_numerical': 0.00749063670411985, 'mean_word_length': 3.151986183074266, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6171199', 'n_tokens_mistral': 856, 'n_tokens_neox': 767, 'n_words': 172}