Health Fixed
After respawn health fixed. Also added new map.
This commit is contained in:
parent
9d243eadf7
commit
be7009c578
65118
Assets/Scenes/FirstVillage.unity
Normal file
65118
Assets/Scenes/FirstVillage.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/FirstVillage.unity.meta
Normal file
7
Assets/Scenes/FirstVillage.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d09d8f73d205f2c4b84728e6fe6c2839
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -37909,8 +37909,8 @@ GameObject:
|
||||
- component: {fileID: 992827809}
|
||||
- component: {fileID: 992827808}
|
||||
- component: {fileID: 992827807}
|
||||
- component: {fileID: 992827806}
|
||||
- component: {fileID: 992827811}
|
||||
- component: {fileID: 992827806}
|
||||
- component: {fileID: 992827812}
|
||||
m_Layer: 5
|
||||
m_Name: yes
|
||||
@ -38073,6 +38073,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mainCh: {fileID: 0}
|
||||
maxHealth: {fileID: 0}
|
||||
--- !u!114 &992827812
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -57,6 +57,8 @@ public class BossThug : MonoBehaviour
|
||||
else if (state == BossThugEnum.Attacking && player.GetComponent<Player>().currentHealth <= 0)
|
||||
{
|
||||
doorway.GetComponent<DoorBehaviour>().ScenetToMoveTo();
|
||||
PlayerPrefs.SetFloat("health-S", 10.0f);
|
||||
PlayerPrefs.SetFloat("health-S", 10.0f);
|
||||
}
|
||||
switch (state)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ public class RespawnScript : MonoBehaviour
|
||||
private string currentScene;
|
||||
|
||||
public GameObject mainCh;
|
||||
public FloatValue maxHealth;
|
||||
|
||||
public void RespawnOnCurrentScene()
|
||||
{
|
||||
@ -17,6 +18,7 @@ public class RespawnScript : MonoBehaviour
|
||||
SceneManager.LoadScene(currentScene);
|
||||
Player player = mainCh.GetComponent<Player>();
|
||||
player.currentHealth = 10.0f;
|
||||
|
||||
PlayerPrefs.SetFloat("health", 10.0f);
|
||||
PlayerPrefs.SetFloat("health-S", 10.0f);
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ public class MainCharacterManager : MonoBehaviour
|
||||
var x = PlayerPrefs.GetFloat("gateway.respawnCoords.x");
|
||||
var y = PlayerPrefs.GetFloat("gateway.respawnCoords.y");
|
||||
var z = PlayerPrefs.GetFloat("gateway.respawnCoords.z");
|
||||
Debug.Log("Gateway");
|
||||
//Debug.Log("Gateway");
|
||||
return new Vector3(x, y, z);
|
||||
}
|
||||
case OnMapAppearanceMethodEnum.LoadGame:
|
||||
@ -73,7 +73,7 @@ public class MainCharacterManager : MonoBehaviour
|
||||
var x = PlayerPrefs.GetFloat("gateway.respawnCoords.x");
|
||||
var y = PlayerPrefs.GetFloat("gateway.respawnCoords.y");
|
||||
var z = PlayerPrefs.GetFloat("gateway.respawnCoords.z");
|
||||
Debug.Log("Load Game");
|
||||
//Debug.Log("Load Game");
|
||||
return new Vector3(x, y, z);
|
||||
}
|
||||
default:
|
||||
|
@ -21,7 +21,7 @@ public class OnMapAppearanceMethod : MonoBehaviour
|
||||
{
|
||||
Gateway = OnMapAppearanceMethodEnum.NewGame;
|
||||
}
|
||||
Debug.Log("Set Gateway");
|
||||
//Debug.Log("Set Gateway");
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user