Beispiel #1
0
 public void init()
 {
     this.findController    = new FindController(this);
     this.assessController  = new AssessController(this);
     this.tacticsController = new TacticsController(this);
     this.moodController    = new MoodController(this, "mood000");
     //this.resetIQ (this._map.AI_IQ);
 }
Beispiel #2
0
    void Start()
    {
        //connect with level controller and script
        levelController       = GameObject.Find("TacticsController");
        levelControllerScript = levelController.GetComponent <TacticsController>();

        //find the rows and columns in of the level grid
        mapRows = levelControllerScript.GetLevelHeight();
        mapCols = levelControllerScript.GetLevelWidth();

        //calculate maximum camera zoom //Orthographic size = ((Vert Resolution)/(PPUScale * PPU)) * 0.5
        cameraCurrentZoom            = ((Screen.height) / (ppuScale * 32)) * 0.5000f;
        cameraZoomMax                = cameraCurrentZoom / 2;
        cameraCurrentZoom            = cameraZoomMax;
        Camera.main.orthographicSize = cameraCurrentZoom;

        //make the camera less sensitive as we zoom in
        cameraSpeedCutBy = originalCameraSpeedCutBy * (cameraCurrentZoom / cameraZoomMax);

        //czm is for viewing only
        czm = cameraCurrentZoom;
    }