Пример #1
0
    public void ShowReactHud(MapReactor reactor)
    {
        GameObject HudHint = Resources.Load <GameObject>("ReactorHint");
        GameObject h       = GameObject.Instantiate(HudHint, reactor.transform.position + new Vector3(0, 0.4f), Quaternion.identity, root);

        hints.Add(h);
    }
Пример #2
0
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Reactor")
     {
         MapReactor reactor = collision.GetComponent <MapReactor>();
         if (!ActivateReactors.Contains(reactor))
         {
             ActivateReactors.Add(reactor);
             OldGameMain.GetInstance().gameMode.HudRoot.ShowReactHud(reactor);
         }
     }
 }
Пример #3
0
 public void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.tag == "Reactor")
     {
         MapReactor reactor = collision.GetComponent <MapReactor>();
         if (ActivateReactors.Contains(reactor))
         {
             int idx = ActivateReactors.IndexOf(reactor);
             ActivateReactors.Remove(reactor);
             OldGameMain.GetInstance().gameMode.HudRoot.HideReactHud(idx);
         }
     }
 }