// Update is called once per frame protected void Update() { if (thinkingEnabled == false) return; if(initalizedIsDone == false) { Initalize (); initalizedIsDone = true; } if(world == null) { world = GameObject.Find ("World").GetComponent<WorldThink>(); if(world == null) { Debug.Log(this.GetType().Name); Debug.Log (world); } } worldIteration = world.GetWorldIteration (); if (iteration < worldIteration) { ThinkAlpha(); Think(); iteration++; } if(world.GetRunning()) ThinkFast (); }
protected void Start() { // thinkingEnabled = true; iteration = 0; worldIteration = 0; world = GameObject.Find ("World").GetComponent<WorldThink>(); // Debug.Log (this.name); }