// Use this for initialization void Start() { ruleAI = new RuleFrameWork(); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); worldState = mainCamera.GetComponent <WorldData>(); lastMove = new NextMovementChoice(); nextMove = new NextMovementChoice(); nextMove.NextMove = NextMovementChoice.NextMoveType.MOVE_NORTH; //The world keeps track of the character's data worldState.CharAI1 = this; }
// Use this for initialization void Start() { //find the world data ( 1 copy exists globally ) worldState = GameObject.Find("WorldDataManager"); worldStateScript = worldState.GetComponent <WorldData>(); //Create the framework, it gets initialized in constructor //TODO ruleBasedAI = new RuleFrameWork(); ruleBasedAI = new RuleFrameWork(); //We don't have a next move yet as we are just starting nextMove = null; AmberColor = new Color(1.0f, 1.0f, 0); RedColor = new Color(1f, 0, 0); GreenColor = new Color(0, 1f, 0); GO_FORCE = 1.5f + Random.Range(0.0f, 1.0f); SLOW_DRAG = 0.2f + Random.Range(0.2f, 0.5f); initGo = false; }