public void TestShipMethods()
 {
     try{
         RadarIconController RIC = new RadarIconController();
         RIC.Start();
         RIC.Update();
     }catch(Exception e) {
         //Something went wrong
         Assert.True(false,"error "+e.ToString());
         //Assert.True(false);
     }
 }
 public void TestShipMethods()
 {
     try{
         RadarIconController RIC = new RadarIconController();
         RIC.Start();
         RIC.Update();
     }catch (Exception e) {
         //Something went wrong
         Assert.True(false, "error " + e.ToString());
         //Assert.True(false);
     }
 }
    public void OnTriggerEnter(Collider otherCollider)
    {
        GameObject triggerObject = otherCollider.collider.gameObject.transform.root.gameObject;

        if (debug)
        {
            Debug.Log("entered radar:  " + triggerObject.tag);
        }
        if (iconTags.Contains(triggerObject.tag) && !objectsOnRadar.Contains(triggerObject))
        {
            if (debug)
            {
                Debug.Log("creating an icon:  " + triggerObject.tag);
            }
            //add enemy to the list
            objectsOnRadar.Add(triggerObject);
            //add icon to icon list
            int        tagIndex           = iconTags.FindIndex(r => r.Equals(triggerObject.tag));
            GameObject objectIconInstance = Instantiate(iconObjects[tagIndex]) as GameObject;
            objectIconInstance.transform.parent = radarIconCamera.transform;
            RadarIconController enemyRadarIconController = objectIconInstance.GetComponent <RadarIconController>();
            SharpUnit.Assert.NotNull(enemyRadarIconController);
            //if(debug) Debug.LogError("There's an error for finding player:"+transform.root.gameObject.name);
            enemyRadarIconController.player          = transform.root.gameObject;
            enemyRadarIconController.playerRadarIcon = playerIcon;
            enemyRadarIconController.radar           = gameObject;
            enemyRadarIconController.objectTracked   = triggerObject;
            if (triggerObject.tag == "Enemy")
            {
                enemyRadarIconController.rotate = true;
            }
            if (GetComponent <SphereCollider>())
            {
                enemyRadarIconController.radarRadius = GetComponent <SphereCollider>().radius;
            }
            iconsOnRadar.Add(objectIconInstance);
        }
    }