// Use this for initialization void Awake() { //玩家的位置 player = constant.getPlayer(); playerPos = player.transform.position; //自己的属性 enemySelf = gameObject.GetComponent <enemy_property>(); spaceSearcherPath = "Prefabs/logic/spaceSearch"; //动画 ani = transform.FindChild("ui").FindChild("AnimatedSprite").gameObject; //寻路工具 //动画脚本 enemyAni = ani.GetComponent <tk2dSpriteAnimator> (); //攻击射击 shooter = gameObject.GetComponent <enemyShotBullet> (); shooter.upgradeProperties(enemySelf); //判断是否开始重复行动 completeMove = true; attackTempTime = 0; lockTempTime = 0; }
// Use this for initialization void Awake() { //自己的属性 enemySelf = gameObject.GetComponent <enemy_property>(); //动画控制 ani = transform.FindChild("ui").FindChild("AnimatedSprite").gameObject; //寻路工具 spaceSearcherPath = "Prefabs/logic/spaceSearch"; //动画脚本 enemyAni = ani.GetComponent <tk2dSpriteAnimator> (); //攻击射击脚本 shooter = gameObject.GetComponent <enemyShotBullet> (); //判断是否开始重复行动 completeMove = true; shooter.upgradeProperties(enemySelf); }