Beispiel #1
0
 private void Awake()
 {
     mCamera.AddBorderChangeListener(this);
     mPlanets = new List <IUnityPlanetData>(mConstants.GetPlanetsToVisualize());
     if (transform != null)
     {
         var chilObject = transform.GetChild(0);
         if (chilObject != null)
         {
             var child = chilObject.gameObject;
             for (int i = 0; i < mConstants.GetPlanetsToVisualize(); ++i)
             {
                 var planet = mPlanetDataFactory.Create().gameObject;
                 if (planet != null)
                 {
                     if (planet.transform != null)
                     {
                         planet.transform.parent = transform;
                     }
                     planet.SetActive(false);
                     mPlanets.Add(planet.GetComponent <IUnityPlanetData>());
                 }
             }
             if (child != null)
             {
                 child.SetActive(false);
             }
         }
     }
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        BlockZoom();
        mCamera.AddBorderChangeListener(this);
        mRootNode = mStartNodeCreator.Create();

        mStartupNodeInitializer.Run(mCamera, mRootNode, this);
        mPlayer.MoveRight();
    }
 // Use this for initialization
 void Start()
 {
     mCamera.AddBorderChangeListener(this);
 }