Worked on UI and translation, worked on classes and races, worked on camera
This commit is contained in:
@@ -43,10 +43,10 @@ namespace Assets.Scripts.Player
|
||||
return null;
|
||||
}
|
||||
|
||||
public void lookAround(Vector2 view, float speed)
|
||||
public void lookAround(Vector2 view, Vector2 speed)
|
||||
{
|
||||
GameObject target = GameObject.Find("targetLooking");
|
||||
target.transform.localPosition = target.transform.localPosition + new Vector3(0,view.y,0) * speed * Time.deltaTime;
|
||||
target.transform.localPosition = target.transform.localPosition + new Vector3(0,view.y,0) * speed.x;// * Time.deltaTime;
|
||||
if(target.transform.localPosition.y >= 2){
|
||||
target.transform.localPosition = new Vector3(target.transform.localPosition.x,2f,target.transform.localPosition.z);
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -89,6 +89,14 @@ namespace Assets.Scripts.Player
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Fireball", "Skills/Mage/Fireball", null);
|
||||
skills[2].setDescription(TextHandler.getText("fireballDesc"));
|
||||
break;
|
||||
case "Druid":
|
||||
skills[0] = new BasicSkill(20, 10, 2, "Stab", "Skills/Thief/Stab", null);
|
||||
skills[0].setDescription(TextHandler.getText("stabDesc"));
|
||||
skills[1] = new BasicSkill(0, 5, 1, "SmokeScreen", "Skills/Thief/SmokeScreen", null);
|
||||
skills[1].setDescription(TextHandler.getText("smokeScreenDesc"));
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Heartstop", "Skills/Thief/Heartstop", null);
|
||||
skills[2].setDescription(TextHandler.getText("heartStopDesc"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +141,9 @@ namespace Assets.Scripts.Player
|
||||
case "Thief":
|
||||
role = new ThiefClass();
|
||||
break;
|
||||
case "Driud":
|
||||
role = new DruidClass();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,6 +166,9 @@ namespace Assets.Scripts.Player
|
||||
case "Goblin":
|
||||
race = new GoblinRace();
|
||||
break;
|
||||
case "Nightelf":
|
||||
race = new NightelfRace();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user