protected override void OnShow(object userData) { base.OnShow(userData); m_FruitData = userData as FruitData; if (m_FruitData == null) { Log.Error("Asteroid data is invalid."); return; } m_CancalTime = 0; m_Rigidbody.useGravity = false; m_Collider.isTrigger = true; }
public static void ShowFruit(this EntityComponent entityCompoennt, FruitData data) { entityCompoennt.ShowEntity(typeof(Fruit), "Fruit", Constant.AssetPriority.FruitAsset, data); }