コード例 #1
0
 public IEnemy(GameObject gameObject) : base(gameObject)
 {
     if (GameObjectInScene != null)
     {
         animator = GameObjectInScene.GetComponent <Animator>();
         Rg2d     = GameObjectInScene.GetComponent <Rigidbody2D>();
         // 关联中介者
         EnemyMedi = new EnemyMediator(this);
         EnemyMedi.Initialize();
     }
 }
コード例 #2
0
ファイル: IEnemy.cs プロジェクト: sols11/Dawnblade
 public IEnemy(GameObject gameObject) : base(gameObject)
 {
     Type = EnemyType.Monster;
     if (GameObjectInScene != null)
     {
         animator     = GameObjectInScene.GetComponent <Animator>();
         Rgbd         = GameObjectInScene.GetComponent <Rigidbody>();
         bt           = GameObjectInScene.GetComponent <BehaviorTree>();
         navMeshAgent = GameObjectInScene.GetComponent <NavMeshAgent>();
         // 关联中介者
         EnemyMedi = new EnemyMediator(this);
         EnemyMedi.Initialize();
     }
 }