Exemplo n.º 1
0
    private void OpenSubmenu()
    {
        Quaternion orientation = Quaternion.LookRotation(Player.Instance.MainCamera.transform.position - transform.position);

        submenu = Instantiate <CrossingMenu>(SubmenuPrefab, transform.position, orientation);
        // Tell to proxy that the submenu was opened (i.e., switch the submenu for topmenu)
        CrossingMenu topMenu = transform.parent.GetComponent <CrossingMenu>();

        topMenu.SubmenuOpened(submenu);
    }
Exemplo n.º 2
0
 public void SubmenuOpened(CrossingMenu submenu)
 {
     submenu.SetOwner(proxy);
     proxy.SetProxyMenu(submenu);
     Close();
 }