Пример #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Player"))
     {
         SC_ShipController shipController = other.GetComponent <SC_ShipController>();
         shipController.Respawn();
         transform.parent.GetComponent <SC_AstroidController>().DestroyAstroid(this);
     }
 }
Пример #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (!other.CompareTag("Player"))
     {
         return;
     }
     IsInside = true;
     if (ShipController == null)
     {
         ShipController = other.GetComponent <SC_ShipController>();
     }
 }
Пример #3
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (!other.CompareTag("Player") || !Interactable)
        {
            return;
        }
        SC_ShipController shipController = other.GetComponent <SC_ShipController>();
        SC_Alternative    alternative    = shipController.GetFollower();

        if (alternative != null)
        {
            SetFilling(alternative.GetText());
            shipController.ClearFollower();
        }
    }