// using System; // // using GAS.Runtime; // using Sirenix.OdinInspector; // // namespace CoreGame.Render // { // [Serializable] // public class TaskCastFlyBulletOneShot : InstantAbilityTask // { // public int bulletId; // public bool randomElementType; // public string canCastExpr = ""; // // #if UNITY_EDITOR // [ShowInInspector] // [HideReferenceObjectPicker] // [ShowIf("m_Cfg")] // private BulletDesc m_Cfg => BulletDescMgr.Instance.GetConfig(bulletId); // #endif // public override void OnExecute(in TaskSpec self) // { // var ctx = self.abilitySpec.ctx; // var canCast = BulletSrv.CanCast(ctx, canCastExpr); // if (!canCast) // return; // // BulletSrv.CreateBulletWithPoint(ctx, bulletId, 0, randomElementType); // } // } // }