Пример #1
0
    // Use this for initialization
    void Awake()
    {
        if (transformVariable == null)
        {
            return;
        }
        if (!transformVariable.loaded)
        {
            transformVariable.OnAfterDeserialize();
        }

        if (saveObject != null)
        {
            saveObject.LoadData();
        }

        if (spawnPoint == null)
        {
            transform.position = transformVariable.RuntimePosition;
            transform.Rotate(transformVariable.RuntimeRotation);
            transform.localScale = transformVariable.RuntimeScale;
        }
        else
        {
            spawnPoint.transform.position = transformVariable.RuntimePosition;
            spawnPoint.transform.Rotate(transformVariable.RuntimeRotation);
            spawnPoint.transform.localScale = transformVariable.RuntimeScale;
            vp_PlayerRespawner playerRespawn = GetComponent <vp_PlayerRespawner>();
            //playerRespawn.Respawn();
        }
        loaded = true;
    }
Пример #2
0
 private void Awake()
 {
     if (saveObject != null)
     {
         saveObject.LoadData();
     }
     ColorLayer.CurrentLevel = currentLevel;
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     saveObject.LoadData();
     if (player.short_name.RuntimeValue != player.short_name.InitialValue)
     {
         gameObject.SetActive(false);
     }
 }