ComAIItem.cs 1012 B

12345678910111213141516171819202122232425262728293031323334
  1. using CommonAI.ZoneClient;
  2. using CommonAIClient.Unity.Utils;
  3. namespace CommonAIClient.Unity.Battle
  4. {
  5. public class ComAIItem : ComAICell
  6. {
  7. protected ZoneItem ZItem { get { return ZObject as ZoneItem; } }
  8. public ComAIItem(BattleScene battleScene, ZoneItem obj)
  9. : base(battleScene, obj)
  10. {
  11. //加载模型
  12. BattleFactroy.Instance.GameObjectAdapter.Load(
  13. ZItem.Info.FileName,
  14. System.IO.Path.GetFileNameWithoutExtension(ZItem.Info.FileName),
  15. (succ, o) =>
  16. {
  17. if (succ)
  18. {
  19. if (this.IsDisposed)
  20. {
  21. BattleFactroy.Instance.GameObjectAdapter.Unload(o);
  22. }
  23. else
  24. {
  25. this.DisplayCell.Model = o;
  26. }
  27. }
  28. });
  29. }
  30. }
  31. }