private void classicMerge() { Debug.Log("TOTO je miesto" + nearbyLocator.getFirstObjectForMerge(pickup.getAttachedObject())); Transform spawnLocation = destroyer.GetSpawnLocation(); GameObject objToBeDestroyed = destroyer.GetObjectToBeDestroyed(); if (spawnLocation != null) { Debug.Log("TUTO SOM SA DOSTAL"); spawner.setPosition(spawnLocation); GameObject FirstComponent = objToBeDestroyed; Debug.Log("FirstObjectToBEDestroyed = " + FirstComponent); destroyer.Action(); //tento znici ten ktory vidi na stole (na stole ide prvy lebo tam sa ma //objavit novy objekt destroyer.SetObjectToBeDestroyed(pickup.getAttachedObject()); //tento ho setne na to aby znicil ten ktory ma v ruke GameObject SecondComponent = destroyer.GetObjectToBeDestroyed(); Debug.Log("secondObjectToBeDestroyed = " + SecondComponent); destroyer.Action(); spawner.Action(FirstComponent, SecondComponent); spawnLocation = null; } else { return; } }