Beispiel #1
0
	// Use this for initialization
	void Start () {
	
		this.character = PlayerPrefs.GetString ("Player");

		this.list_inventory = new List<Item>();
		this.equip = new Item[5]; //"Weapon, Shield, Helmet, Armor, Boots"
		this.inventoryTexture = Resources.Load<Texture2D>("Inventory/Misc/inventory_" + this.character);
		this.map_lvl1 = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv1> ();
		this.map_lvl2 = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv2> ();
		//this.prueba = Resources.Load<Texture2D>("Inventory/Misc/slot");

		this.cs = GameObject.FindGameObjectWithTag ("Player").GetComponent<CharacterScript> ();
		this.cm = GameObject.FindGameObjectWithTag ("Player").GetComponent<ClickToMove> ();
		this.cm2 = GameObject.FindGameObjectWithTag ("Player").GetComponent<ClickToMove_lvl2> ();

		// Memory Card Save/Load data
		this.mc = GameObject.FindGameObjectWithTag ("MemoryCard").GetComponent<MemoryCard> ();
		this.save = this.mc.saveData();
		this.load = this.mc.loadData();

		// STYLES TEXT
		this.attributes_style = new GUIStyle ();
		//this.text_style.font = Resources.Load<Font>("MainMenu/avqest");
		this.attributes_style.fontStyle = FontStyle.Bold;
		this.attributes_style.normal.textColor = new Color (236f/255f,219f/255f,31f/255f);
		this.attributes_style.fontSize = 20;

		this.exp_style = new GUIStyle ();
		//this.text_style.font = Resources.Load<Font>("MainMenu/avqest");
		this.exp_style.fontStyle = FontStyle.Bold;
		this.exp_style.normal.textColor = new Color (236f/255f,219f/255f,31f/255f);
		this.exp_style.fontSize = 17;

		this.level_style = new GUIStyle ();
		//this.text_style.font = Resources.Load<Font>("MainMenu/avqest");
		this.level_style.fontStyle = FontStyle.Bold;
		this.level_style.normal.textColor = new Color (236f/255f,219f/255f,31f/255f);
		this.level_style.fontSize = 13;

		// CREATE INVENTORY
		this.resizeInventory ();
		this.createInventorySlot ();

		int num = this.load.loadNumItemsInventory ();

		if (num > 0)
			this.load.loadInventoryItems (num);

		this.equip = load.loadEquipItem ();
	}