public override void OnShow(object userData) { base.OnShow(userData); m_AsteroidData = EntityData as AsteroidData; if (m_AsteroidData == null) { HotLog.Error("Asteroid data is invalid."); return; } m_RotateSphere = Random.insideUnitSphere; }
//显示陨石实体 public static void ShowAsteroid(this EntityComponent entityComponent, AsteroidData data) { entityComponent.ShowEntity(typeof(Asteroid), "Asteroid", Constant.AssetPriority.AsteroiAsset, data); }