public GameObject Skin;
public GameObject TargetSkin;
public GameObject StartSkin;
public GameObject Skin1;
public GameObject TargetSkin1;
public GameObject StartSkin1;
public GameObject Skin2;
public GameObject TargetSkin2;
public GameObject StartSkin2;
public GameObject Skin3;
public GameObject TargetSkin3;
public GameObject StartSkin3;
public GameObject Skin4;
public GameObject TargetSkin4;
public GameObject StartSkin4;
public GameObject Skin5;
public GameObject TargetSkin5;
public GameObject StartSkin5;
public GameObject Skin6;
public GameObject TargetSkin6;
public GameObject StartSkin6;
// Update is called once per frame
void Update()
{
int skin = PlayerPrefs.GetInt("Skin");
if(skin == 0){
Skin.transform.position = Vector3.Lerp(Skin.transform.position,TargetSkin.transform.position,1*Time.deltaTime);
}
else if(skin != 0) Skin.transform.position = Vector3.Lerp(Skin.transform.position,StartSkin.transform.position,1*Time.deltaTime);
if(skin == 1){
Skin1.transform.position = Vector3.Lerp(Skin1.transform.position,TargetSkin1.transform.position,1*Time.deltaTime);
}
else if(skin != 1) Skin1.transform.position = Vector3.Lerp(Skin1.transform.position,StartSkin1.transform.position,1*Time.deltaTime);
if(skin == 2){
Skin2.transform.position = Vector3.Lerp(Skin2.transform.position,TargetSkin2.transform.position,1*Time.deltaTime);
}
else if(skin != 2) Skin2.transform.position = Vector3.Lerp(Skin2.transform.position,StartSkin2.transform.position,1*Time.deltaTime);
if(skin == 3){
Skin3.transform.position = Vector3.Lerp(Skin3.transform.position,TargetSkin3.transform.position,1*Time.deltaTime);
}
else if(skin != 3) Skin3.transform.position = Vector3.Lerp(Skin3.transform.position,StartSkin3.transform.position,1*Time.deltaTime);
if(skin == 4){
Skin4.transform.position = Vector3.Lerp(Skin4.transform.position,TargetSkin4.transform.position,1*Time.deltaTime);
}
else if(skin != 4) Skin4.transform.position = Vector3.Lerp(Skin4.transform.position,StartSkin4.transform.position,1*Time.deltaTime);
if(skin == 5){
Skin5.transform.position = Vector3.Lerp(Skin5.transform.position,TargetSkin5.transform.position,1*Time.deltaTime);
}
else if(skin != 5) Skin5.transform.position = Vector3.Lerp(Skin5.transform.position,StartSkin5.transform.position,1*Time.deltaTime);
if(skin == 6){
Skin6.transform.position = Vector3.Lerp(Skin6.transform.position,TargetSkin6.transform.position,1*Time.deltaTime);
}
else if(skin != 6) Skin6.transform.position = Vector3.Lerp(Skin6.transform.position,StartSkin6.transform.position,1*Time.deltaTime);
}
и в общем после повторных запусков оно пишет что скин поднят но сам скин не поднимается значит буду копать почему не поднимается.