Slime Temp and Bug fixes

>Fixed some bakes with the Hail
>Fixed the movement bugs with the king's movement
>Added the Slime in a semi-functional state
This commit is contained in:
Katherine
2022-02-10 15:54:16 -06:00
parent 3c1e36726a
commit 35c5c41f5a
7 changed files with 136 additions and 52 deletions

View File

@@ -39,7 +39,7 @@ public class KingPlace : NetworkBehaviour
private GameObject Place;
private GameObject PlaceTemp;
private GameObject HailCorner;
private GameObject SlimeDir;
private int SlimeDir;
private bool FirstPlacing = false;
private bool HailPlacing = false;
private bool SlimePlacing = false;
@@ -93,13 +93,16 @@ public class KingPlace : NetworkBehaviour
{
HailCorner.transform.position = RayCastHit.point;
}
if (Input.GetMouseButtonUp(0)) {//Reads the player clicking the left mouse button again
if (Input.GetMouseButtonUp(0)) {//Reads the player releasing the left mouse button
CreateHail();
}
}
if (SlimePlacing == true) {
//TODO draw arrow in direction of slime move
//TODO CreateSlime function?
SlimeDir = DrawArrow();
if (Input.GetMouseButtonUp(0)) {//Reads the player releasing the left mouse button
PlaceTemp.GetComponent<Slime>().GooStart(SlimeDir);
SlimePlacing = false;
}
}
}
@@ -172,6 +175,11 @@ public class KingPlace : NetworkBehaviour
}
}
private int DrawArrow() {
//TODO convert mouse position to arrow direction. then return the int of what direction it is
return 2;
}
[ServerRpc(RequireOwnership = false)]
private void SpawnBoxServerRPC(Vector3 spawnLoc) {
boxPlaced = Instantiate(Block, spawnLoc, Quaternion.identity);