Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     ms_instance = this;
     waypoints   = new List <Waypoint>();
     removedWP   = new List <Waypoint> ();
     uic         = canvas.GetComponent <UIControl>();
     tileSize    = Mathf.Pow(gameObject.GetComponent <AStarSearch> ().m_tileWidth * 1.0f, 2.0f);
     mapOffset   = tileSize * 100;
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        loadText.text = "Loading, Please Wait...";
        worldRepButton.gameObject.SetActive(false);
        nextSceneButton.gameObject.SetActive(false);
        heuristicSlider.gameObject.SetActive(false);
        ManhattanLabel.gameObject.SetActive(false);
        EuclideanLabel.gameObject.SetActive(false);
        worldRepText  = worldRepButton.gameObject.GetComponentInChildren <Text> ();
        nextSceneText = nextSceneButton.gameObject.GetComponentInChildren <Text> ();
        worldRepButton.onClick.AddListener(toggleWorld);
        nextSceneButton.onClick.AddListener(loadNextScene);

        aStar = gameMap.GetComponent <AStarSearch> ();
        wpc   = gameMap.GetComponent <WaypointCreation> ();

        isTile      = true;
        isManhattan = false;
    }