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

/// <summary>
/// Action for fleeing away from another character
/// </summary>
public class StopCharacter : Action
{
	private GameObject target;
	private float distance;
	private NavMeshHit hit;
	private bool done = false;

	/// <summary>
	/// Creates a Flee action that causes the target
	/// to flee the given GameObject
	/// </summary>
	/// <param name="target">GameObject to flee</param>
	/// <param name="distance">Distance to keep away from "target" </param>
	public StopCharacter(GameObject target)
	{
		this.target = target;
		this.distance = distance;

		// Shouldn't ever provide a null target, but just in case
		if (target == null) 
		{
			this.done = true;
		}
	}
	
	/// <summary>
	/// Updates the target position of the character
	/// to flee the target GameObject.
	/// </summary>
	/// <param name="character">The character controlled by the action</param>
	public void Apply(Character character)
	{
		// Shouldn't ever happen, but just in case
		if (target == null) 
		{
			return;
		}

		// For now, just delete the robber from the game world when captured
		Destroy(target);

		// After one run this action will be completed no matter what (COULD CHANGE LATER)
		done = true;
	}

	/// <summary>
	/// Checks whether or not the Action has been completed
	/// </summary>
	/// <returns>true if complete, false if still going</returns>
	public bool IsDone() 
	{
		return done;
	}
}<commit_msg>Fixed a compile-time error that Unity was hiding from me.<commit_after>﻿using UnityEngine;
using System.Collections;

/// <summary>
/// Action for fleeing away from another character
/// </summary>
public class StopCharacter : Action
{
	private GameObject target;
	private float distance;
	private NavMeshHit hit;
	private bool done = false;

	/// <summary>
	/// Creates a Flee action that causes the target
	/// to flee the given GameObject
	/// </summary>
	/// <param name="target">GameObject to flee</param>
	/// <param name="distance">Distance to keep away from "target" </param>
	public StopCharacter(GameObject target)
	{
		this.target = target;
		this.distance = distance;

		// Shouldn't ever provide a null target, but just in case
		if (target == null) 
		{
			this.done = true;
		}
	}
	
	/// <summary>
	/// Updates the target position of the character
	/// to flee the target GameObject.
	/// </summary>
	/// <param name="character">The character controlled by the action</param>
	public void Apply(Character character)
	{
		// Shouldn't ever happen, but just in case
		if (target == null) 
		{
			return;
		}

		// For now, just delete the robber from the game world when captured
		GameObject.Destroy(target);

		// After one run this action will be completed no matter what (COULD CHANGE LATER)
		done = true;
	}

	/// <summary>
	/// Checks whether or not the Action has been completed
	/// </summary>
	/// <returns>true if complete, false if still going</returns>
	public bool IsDone() 
	{
		return done;
	}
}
{'fraction_non_alphanumeric': 0.11927831607083195, 'fraction_numerical': 0.0, 'mean_word_length': 3.1069958847736627, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '2963669', 'n_tokens_mistral': 942, 'n_tokens_neox': 863, 'n_words': 343}