Beispiel #1
0
    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>();
 }
Beispiel #3
0
 public void Initialize()
 {
     this.thiefController = this.GetComponent <ThiefController>();
     this.timerManager    = TimerManager.Instance;
 }
Beispiel #4
0
 private void Awake()
 {
     thiefController = GameObject.FindGameObjectWithTag("Player").GetComponent <ThiefController>();
 }