// Use this for initialization void Start() { manager = FindObjectOfType <GameManager>(); confirm.enabled = false; chooseTxt.text = "Which do you want?"; ask = ""; trade.gameObject.SetActive(false); trade.enabled = false; SceneManager.SetActiveScene(SceneManager.GetSceneByBuildIndex(6)); if (SceneManager.GetSceneByBuildIndex(5).isLoaded) { fromMarket = true; } if (index < PlayerInventory.Inventory.InventoryList.Count) { monster = PlayerInventory.Inventory.InventoryList[index]; if (monster == monsterScript.Type.BLOB) { mon_name.text = "BLOB"; mon_mov1.text = "Goo Throw"; mon_mov2.text = "Toxic"; } else if (monster == monsterScript.Type.Long) { mon_name.text = "Long"; mon_mov1.text = "Bind"; mon_mov2.text = "Bite"; } else if (monster == monsterScript.Type.Char_Star) { mon_name.text = "Char_Star"; mon_mov1.text = "Throwing Star"; mon_mov2.text = "Charring"; } if (fromMarket) { trade.gameObject.SetActive(true); trade.enabled = true; } } }
void Awake() { spriteR = GetComponent <SpriteRenderer>(); sprites = Resources.LoadAll <Sprite>("EnemySprites"); List <monsterScript.Type> inventory = PlayerInventory.Inventory.InventoryList; monsterScript.Type type = inventory[0]; if (type == monsterScript.Type.BLOB) { LoadMonsterSprite(1); } else if (type == monsterScript.Type.Char_Star) { LoadMonsterSprite(567); } else if (type == monsterScript.Type.Long) { LoadMonsterSprite(232); } }