Пример #1
0
 //TODO put to the right place
 void Update()
 {
     if (Input.GetKeyDown(EditorInputManger.Instance().Save))
     {
         Save();
     }
 }
Пример #2
0
 //TODO put to the right place
 void Update()
 {
     if (Input.GetKeyDown(EditorInputManger.Instance().Load))
     {
         LoadEditor();
     }
 }
Пример #3
0
    public override void Update()
    {
        if (Input.GetKeyDown(EditorInputManger.Instance().RemovePrefab))
        {
            editor.CurrentTile.Clear(editor.LayerIndex);
        }

        if (Input.GetMouseButtonDown(0))
        {
            if (editor.CurrentTile != null && editor.Preview != null)
            {
                editor.CurrentTile.AddPrefab(editor.InstantiatePrefab(), editor.LayerIndex);
            }
            else
            {
                if (editor.Preview != null)
                {
                    editor.DestroyPrefab();
                }
            }
        }
    }