Cleaned up project

This commit is contained in:
TAASONI3
2023-12-26 21:28:56 +01:00
parent 9737362dd5
commit 4626722b94
527 changed files with 6 additions and 32823 deletions

View File

@@ -141,9 +141,8 @@ public class Controls : MonoBehaviour
fight.GetComponent<Fight>().startFight(worldGen.GetComponent<WorldGenerator>().getCurrentTile(), target, player);
break;
case "Tree":
playParticle(target);
StartCoroutine(playParticle(target));
GameObject.Find("Inventory").GetComponent<Inventory>().addItem(new Item("Wood"));
//Destroy(target);
break;
case "Stone":
GameObject.Find("Inventory").GetComponent<Inventory>().addItem(new Item("Rock"));
@@ -182,7 +181,7 @@ public class Controls : MonoBehaviour
}
}
public void playParticle(GameObject target)
IEnumerator playParticle(GameObject target)
{
Vector3 playerPos = player.transform.position;
playerPos.y = target.transform.position.y;
@@ -191,6 +190,8 @@ public class Controls : MonoBehaviour
ParticleSystem.ShapeModule shape = particleSystem.shape;
shape.rotation = newRotation.eulerAngles;
particleSystem.Play();
yield return new WaitUntil(() => !particleSystem.isPlaying);
Destroy(target);
}
public void OnInventory()