// Use this for initialization void Start () { if (isBear) { TaiwanBearScript = rabbit.GetComponent<TaiwanBearAI> (); } else { rabbitScript = rabbit.GetComponent<rabbitMove> (); } }
//public GameObject thisEnemy; //private weaponScript[] weapons; void Awake() { // Retrieve the weapon only once //weapons = GetComponentsInChildren<weaponScript>(); // Retrieve scripts to disable when not spawn MoveScript = GetComponent<moveScript>(); rabbitMoveScript = GetComponent<rabbitMove> (); }