Beispiel #1
0
 void OnTriggerExit(Collider other)
 {
     if (other.tag == "Colonie")
     {
         m_Ship.m_NearFromColonie = false;
         m_Colonie = null;
     }
 }
Beispiel #2
0
 void OnTriggerStay(Collider other)
 {
     if (other.tag == "Colonie")
     {
         if ((other.gameObject.GetComponent <ColonieSystem>().m_Colonie.m_IsGreen == true && m_Ship.m_IsGreen == true) || (other.gameObject.GetComponent <ColonieSystem>().m_Colonie.m_IsOrange == true && m_Ship.m_IsGreen == false))
         {
             m_Ship.m_NearFromColonie = true;
             m_Colonie = other.gameObject.GetComponent <ColonieSystem>().m_Colonie;
         }
     }
 }
Beispiel #3
0
 public void sendShipColonie()
 {
     cloneColonie = (Colonie)Instantiate(colonie, new Vector3(0.5f, 0.5f, 2), transform.rotation);
     if (!isColonise && cloneColonie.decreaseMoney())
     {
         cloneColonie.setEndPos(new Vector2(transform.position.x, transform.position.y));
         cloneColonie.endPos.x = transform.position.x;
         cloneColonie.endPos.y = transform.position.y;
         isColonise            = true;
         barColor.color        = Color.green;
     }
 }
 // Use this for initialization
 void Start()
 {
     m_Colonie        = transform.parent.GetComponent <Colonie>();
     m_GreenShipNear  = 0;
     m_OrangeShipNear = 0;
 }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     m_Colonie = transform.parent.GetComponent <Colonie>();
 }
 // Use this for initialization
 void Start()
 {
     m_Colonie = transform.parent.GetComponent<Colonie>();
 }
 // Use this for initialization
 void Start()
 {
     m_Colonie = transform.parent.GetComponent<Colonie>();
     m_GreenShipNear = 0;
     m_OrangeShipNear = 0;
 }