Worked on UI and translation, worked on classes and races, worked on camera

This commit is contained in:
TAASONI3
2024-06-30 20:00:34 +02:00
parent cbd086d658
commit 80e11d3ce0
33 changed files with 3415 additions and 860 deletions

View File

@@ -129,6 +129,9 @@ namespace Assets.Scripts.Player
case 2:
role = new ThiefClass();
break;
case 3:
role = new DruidClass();
break;
}
switch (PlayerPrefs.GetInt("race"))
{
@@ -147,6 +150,9 @@ namespace Assets.Scripts.Player
case 4:
race = new GiantRace();
break;
case 5:
race = new NightelfRace();
break;
}
string playername = PlayerPrefs.GetString("playername");
difficulty = PlayerPrefs.GetInt("difficulty");
@@ -180,15 +186,14 @@ namespace Assets.Scripts.Player
canJump = false;
}
}
Vector3 movement = new Vector3(0, 0, input.z);
Vector3 movement = new Vector3(input.x, 0, input.z);
gameObject.transform.Translate(movement * speed * Time.deltaTime);
gameObject.transform.Rotate(Vector3.up, input.x * 100 * Time.deltaTime);
gameObject.GetComponent<Animator>().SetFloat("velocity", (movement * speed).z);
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("explore", gameObject, 1);
}
public void rotate(Vector2 input, float speed){
transform.Rotate(Vector3.up, input.x * speed * 10 * Time.deltaTime);
public void rotate(Vector2 input, Vector2 speed){
transform.Rotate(Vector3.up, input.x * speed.y);// * Time.deltaTime);
}
public void getRotation()