protected override void OnShow(object userData) { base.OnShow(userData); m_BulletData = (BulletData)userData; CachedTransform.SetLocalScaleX(1.8f); CachedTransform.position = m_BulletData.ShootPostion; //监听小鸟死亡事件 GameEntry.Event.Subscribe(BirdDeadEventArgs.EventId, OnBirdDead); }
/// <summary> /// 显示子弹实体 /// </summary> public static void ShowBullet(this EntityComponent entityComponent, BulletData data) { entityComponent.ShowEntity(typeof(Bullet), "Bird", data); }
public static void ShowBullet(this EntityComponent entityComponent, BulletData data) { entityComponent.ShowEntity(typeof(Bullet), "Bullet", Constant.AssetPriority.BulletAsset, data); }