Ejemplo n.º 1
0
 void Start()
 {
     if (s == null)
     {
         s = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
     DontDestroyOnLoad(this.gameObject);
     this.gameObject.transform.position = new Vector3(0, 0, 0);
     this.gameObject.transform.rotation = Quaternion.identity;
 }
Ejemplo n.º 2
0
    void Awake()
    {
        if (instance == null)
        {
            DontDestroyOnLoad(gameObject);
            instance = this;
        }
        else if (instance != null)
        {
            Destroy(gameObject);
        }

        if (player == null)
        {
            player = GameObject.FindGameObjectWithTag("Player");
        }
        if (warpTriggerArray.Length == 0)
        {
            warpTriggerArray = GameObject.FindGameObjectsWithTag("WarpTrigger");
        }
    }
Ejemplo n.º 3
0
    public void GameReplay()
    {
        ManageScene loadScene = new ManageScene();

        loadScene.LoadSceneIndex(1);
    }
Ejemplo n.º 4
0
 void Awake()
 {
     instance = this;
 }
Ejemplo n.º 5
0
 void Start() => sceneManagement = FindObjectOfType <ManageScene>();
Ejemplo n.º 6
0
 void Start()
 {
     candy = GameObject.Find("Candy");
     scriptSceneManagement = Resources.LoadAll <GameObject>("Prefabs/@GameToolsManagement")[0].GetComponent <ManageScene>();
     scriptSaveManagement  = Resources.LoadAll <GameObject>("Prefabs/@GameToolsManagement")[0].GetComponent <ManageSaves>();
 }
Ejemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     instance = this;
 }
Ejemplo n.º 8
0
 void Start()
 {
     spriteRenderer  = GetComponent <SpriteRenderer>();
     sceneManagement = FindObjectOfType <ManageScene>();
 }
Ejemplo n.º 9
0
 public void Start()
 {
     gb = gameObject.GetComponent <GameBrain> ();
     sm = gameObject.GetComponent <ManageScene> ();
 }