Esempio n. 1
0
    void Start()
    {
		log = gameObject.AddComponent<SuccessfulActionLog>();
        agent = GetComponent<NavMeshAgent>();

        targetIndicator = transform.Find("Target").gameObject;
        targetIndicator.SetActive(false);

        sfx = transform.Find("SFX").GetComponent<SFX>();

        textBox = GameObject.Find("textbox");
		t = GameObject.Find("report").GetComponent<Text>();
		textBox.SetActive(false);
	}
Esempio n. 2
0
	public bool TestAgainst(SuccessfulActionLog other)
	{
		int theirIndex = 0;
		// go through each of our actions, and find an equivalent in the other
		for (int i = 0; i < actions.Count; i++) {
			bool foundThisAction = false;
			while (theirIndex < other.actions.Count)
			{
				if (other.actions[theirIndex] == actions[i])
				{
					foundThisAction = true;
				}
				theirIndex++;
				if (foundThisAction) break;
			}
			if (!foundThisAction) return false;
		}
		return true;
	}