reverted last change partly (cam), added animation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user