Ejemplo n.º 1
0
        protected internal override void OnShow(object userData)
        {
            base.OnShow(userData);

            m_AsteroidData = userData as AsteroidData;
            if (m_AsteroidData == null)
            {
                Log.Error("Asteroid data is invalid.");
                return;
            }

            m_RotateSphere = Random.insideUnitSphere;
        }
Ejemplo n.º 2
0
        protected override void OnShow(object userData)
        {
            base.OnShow(userData);
            bg sceneBackground = FindObjectOfType <bg>();

            if (sceneBackground == null)
            {
                Debug.LogWarning("Can not find scene background.");
                return;
            }
            data = userData as AsteroidData;
            if (data == null)
            {
                Debug.LogError("Aircraft data is invalid.");
                return;
            }

            random = Random.insideUnitSphere;
            main   = (MainProcedure)GameEntry.Procedure.GetProcedure <MainProcedure>();
        }
Ejemplo n.º 3
0
 public static void ShowAsteroid(this EntityComponent entityCompoennt, AsteroidData data)
 {
     entityCompoennt.ShowEntity(typeof(Asteroid), "Asteroid", Constant.AssetPriority.AsteroiAsset, data);
 }
Ejemplo n.º 4
0
 public static void ShowAsteroid(this EntityComponent entityCompoennt, AsteroidData data)
 {
     entityCompoennt.ShowEntity(typeof(Asteroid), "Asteroid", data);
 }