private void InitWorldState() { worldState = new State(); currentPlan = new Queue <Action>(); agent = GetComponent <NavMeshAgent>(); thief = GameObject.FindGameObjectWithTag("Thief").GetComponent <ThiefController>(); foreach (Inventory inventory in (Inventory[])Enum.GetValues(typeof(Inventory))) { Dictionary <Spice, int> spices = new Dictionary <Spice, int>(); worldState[inventory] = spices; foreach (Spice spice in (Spice[])Enum.GetValues(typeof(Spice))) { worldState[inventory][spice] = 0; } } UpdateUI(); }
// Use this for initialization void Start() { canHit = canKnock = true; if (null == ninjia) ninjia = GameObject.Find("Ninjia").GetComponent<ThiefController>(); }
public void Initialize() { this.thiefController = this.GetComponent <ThiefController>(); this.timerManager = TimerManager.Instance; }
private void Awake() { thiefController = GameObject.FindGameObjectWithTag("Player").GetComponent <ThiefController>(); }