reverted last change partly (cam), added animation

This commit is contained in:
TAASONI3
2023-12-27 12:36:09 +01:00
parent 0865eee42f
commit 02a20443c2
16 changed files with 1169 additions and 137 deletions

View File

@@ -50,7 +50,7 @@ public class Controls : MonoBehaviour
{
if (uihandler.canPlayerRotate())
{
player.GetComponent<PlayerGameObject>().lookAround(view, playerInput.currentControlScheme == "Controller");
playerCam.GetComponent<PlayerCamera>().lookAround(view, playerInput.currentControlScheme == "Controller");
}
if (uihandler.canPlayerMove())
{
@@ -141,7 +141,7 @@ public class Controls : MonoBehaviour
fight.GetComponent<Fight>().startFight(worldGen.GetComponent<WorldGenerator>().getCurrentTile(), target, player);
break;
case "Tree":
StartCoroutine(playParticle(target));
StartCoroutine(playAnimation(target, "Chopping"));
GameObject.Find("Inventory").GetComponent<Inventory>().addItem(new Item("Wood"));
break;
case "Stone":
@@ -174,7 +174,7 @@ public class Controls : MonoBehaviour
{
GameObject.Find("Inventory").GetComponent<Inventory>().addItem(new Item("Tin ore"));
}
Destroy(target);
StartCoroutine(playAnimation(target, "Mining"));
break;
}
}