Пример #1
0
    // Use this for initialization
    void OnEnable()
    {
        map            = KS_Map.Instance;
        map.useMiniMap = true;
        map.EnableMinimap();
        mapContainer.SetActive(true);

        FindObjectOfType <MapSwticher>().enabled = true;
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.N) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            map.useMiniMap = !map.useMiniMap;

            if (map.MiniMapActive && !map.useMiniMap && !map.MapActive)
            {
                map.DisableMinimap();
                mapContainer.SetActive(false);
            }
            if (!map.MapActive && map.useMiniMap)
            {
                map.EnableMinimap();
                mapContainer.SetActive(true);
            }
        }
    }
Пример #3
0
 // Update is called once per frame
 void Update()
 {
     if ((Input.GetKeyDown(KeyCode.M) || KS_Input.GetInputDown("map")) && Manager.State == KS_Manager.GameState.Playing)
     {
         if (!mapActive)
         {
             map.DisableMinimap();
             playerCam.enabled = false;
             map.ShowMap();
             mapActive = true;
         }
         else
         {
             mapActive = false;
             map.HideMap();
             map.EnableMinimap();
             playerCam.enabled = true;
         }
     }
 }