void Start() { spriterenderer = GetComponent <SpriteRenderer>(); physic = GetComponent <Rigidbody2D>(); game_control = GameObject.FindGameObjectWithTag("game_control_TAG").GetComponent <game_control>(); sounds = GetComponents <AudioSource>(); high_score = PlayerPrefs.GetInt("save"); }
// Use this for initialization void Start () { controller = GameObject.FindGameObjectWithTag ("Controller").GetComponent<game_control> (); heading = Direction.N; //crosshair = GameObject.FindGameObjectWithTag ("crosshair").GetComponent<CrosshairControl>(); Debug.Log (crosshair); }
//end of reset feature void Awake() { if (control == null) { DontDestroyOnLoad(gameObject); control = this; //adding defaul data to mision catalog addmision(0, 1); addmision(1, 0); addmision(2, 0); addmision(3, 0); addmision(4, 0); addmision(5, 0); addmision(6, 0); addmision(7, 0); addmision(8, 0); addmision(9, 0); additem(0, 1, 100); additem(1, 1, 300); additem(2, 1, 50); additem(3, 1, 100); additem(4, 1, 500); additem(5, 1, 1000); additem(6, 1, 50); additem(7, 1, 50); additem(8, 1, 2000); additem(9, 1, 2000); catalogo_inventario[0].inventario = 3; catalogo_inventario[1].inventario = 1; catalogo_inventario[2].inventario = 3; catalogo_inventario[0].unlocked = 1; catalogo_inventario[2].unlocked = 1; catalogo_inventario[3].unlocked = 1; catalogo_inventario[4].unlocked = 1; catalogo_inventario[5].unlocked = 0; catalogo_inventario[6].unlocked = 0; catalogo_inventario[7].unlocked = 0; catalogo_inventario[8].unlocked = 0; catalogo_inventario[9].unlocked = 0; catalogo_orbes_misiones.Add(0, resetmsionorebsdata()); catalogo_orbes_misiones.Add(1, resetmsionorebsdata()); catalogo_orbes_misiones.Add(2, resetmsionorebsdata()); catalogo_orbes_misiones.Add(3, resetmsionorebsdata()); catalogo_orbes_misiones.Add(4, resetmsionorebsdata()); idioma = "Esp"; addmisioncalabozo(0, 1); Load_playerdata(); load_idiomasetup(); load_Espsetup(); load_calabozodata(); load_expdata(); load_orbesdata(); } else if (control != this) { Destroy(gameObject); } }