Exemplo n.º 1
0
 void Awake()
 {
     if (instance != null)
     {
         Debug.Log("more than 1 manager");
     }
     instance = this;
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     groundCount = 0;
     drop        = false;
     gPParent    = GPManager.instance;
     gPSon       = gPParent.guineaPigs;
     destination = transform.position;
     current     = 0;
 }
Exemplo n.º 3
0
    void Awake()
    {
        if (instance != null)
        {
            throw new System.Exception("You have more than 1 GPManager in the scene.");
        }

        // Initialize the static class variables
        instance = this;
        DontDestroyOnLoad(gameObject);
    }
Exemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        int index = SceneManager.GetActiveScene().buildIndex;

        speed            = index * 0.5f;
        onFire           = false;
        addOffset        = new Vector3(0, 0 + yAxisOffset, 0);
        currentDirection = right;
        nextPos          = Vector3.right;
        dirIndex         = 1;
        destination      = transform.position;
        manager          = GPManager.instance;
        turnPos          = new Queue <Vector3>();
        turnDir          = new Queue <bool>();
    }
Exemplo n.º 5
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(this);
        }

        if (this)
        {
            Load();
        }
    }
Exemplo n.º 6
0
    // Use this for initialization
    void Awake()
    {
        if (singleton == null)
        {
            singleton = this;
        }
        else if (singleton != this)
        {
            Destroy(gameObject);
            return;
        }

        canvases = FindObjectOfType <Canvases>();

        BeginAuthorize();
    }