SkillControlAdapter.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using UnityEngine;
  2. using System.Collections;
  3. namespace YLBattle
  4. {
  5. /// <summary>
  6. /// 技能释放(数据交换)
  7. /// </summary>
  8. public partial class SkillControl : MonoBehaviour
  9. {
  10. /// <summary>
  11. /// 通知后端子弹当前位置
  12. /// </summary>
  13. /// <param name="id">id</param>
  14. /// <param name="x">x</param>
  15. /// <param name="y">y</param>
  16. public void ModifyBulletPostion(string id, Vector3 pos)
  17. {
  18. if (mBattleFeildAdapter != null)
  19. {
  20. mBattleFeildAdapter.ModifyBulletPostion(id, pos);
  21. }
  22. }
  23. /// <summary>
  24. /// 移除[轨迹阶段的]子弹..
  25. /// </summary>
  26. /// <param name="id">子弹id.</param>
  27. public void removeProjectile(string id)
  28. {
  29. if (ProjectileBases.ContainsKey(id))
  30. {
  31. Destroy(this.ProjectileBases[id].gameObject);
  32. ProjectileBases.Remove(id);
  33. }
  34. }
  35. /// <summary>
  36. /// 移除[爆炸完毕的]子弹.
  37. /// </summary>
  38. /// <param name="id">子弹id.</param>
  39. public void removeExplode(string id)
  40. {
  41. if (ExplodeBases.ContainsKey(id))
  42. {
  43. Destroy(this.ExplodeBases[id].gameObject);
  44. ExplodeBases.Remove(id);
  45. }
  46. ///通知子弹消亡
  47. if (mBattleFeildAdapter != null)
  48. {
  49. mBattleFeildAdapter.MarkBulletDead(id);
  50. }
  51. }
  52. }
  53. }