Пример #1
0
 GlobalGameDetails GlobalState()
 {
     if (!ggd)
     {
         GameObject[] states = GameObject.FindGameObjectsWithTag("PersistedState");
         ggd = states[0].GetComponent <GlobalGameDetails>();
     }
     return(ggd);
 }
Пример #2
0
    void FixedUpdate()
    {
        GameObject[] states = GameObject.FindGameObjectsWithTag("PersistedState");
        ggd = states[0].GetComponent <GlobalGameDetails>();
        float   offset = ggd.BlindOffset();
        Vector3 v      = new Vector3(0, offset * multiplier, 0.5F);

        transform.localPosition = v;
    }
 public void Awake()
 {
     if (!i)
     {
         i = this;
         DontDestroyOnLoad(this);
     }
     else
     {
         Destroy(gameObject);
     }
 }