Beispiel #1
0
 protected virtual void GetComponentAniControl()
 {
     aniControl = GetComponentInChildren <EnemyAnimationControl>();
     if (aniControl != null)
     {
         aniControl.Weapon = Weapon;
     }
     else
     {
         Debug.Log("[EnemyStateControl][GetComponentAniControl]: EnemyAnimationControl is null!");
     }
 }
	// Use this for initialization
	void Awake () {
		player = GameObject.FindGameObjectWithTag("player").transform;
<<<<<<< HEAD
		enemyAnimationScript = GetComponentInChildren<EnemyAnimationControl>() as EnemyAnimationControl;
		enemyMoveBaseScript = gameObject.GetComponent<EnemyMoveBase>() as EnemyMoveBase;
		mob = gameObject.GetComponent<Mob>();
=======
		enemyAnimationScript = (EnemyAnimationControl)this.transform.FindChild(modelName).GetComponent<EnemyAnimationControl>();
        mob = gameObject.AddComponent<Mob>();
        mob.Init(CombatUtility.GenNextMobID());
        SceneMng.instance.AddSceneObj(mob);
>>>>>>> parent of cde666f... 怪物受精
	}
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     aniControl = GetComponent <EnemyAnimationControl>();
 }
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("player").transform;
     enemyAnimationScript = (EnemyAnimationControl)this.transform.FindChild(modelName).GetComponent<EnemyAnimationControl>();
 }