// Use this for initialization void Start() { GameObject spawnedItem = CubyGameManager.GetInstance().SpawnItem(transform.position); //add cost script ShopItemScript script = (ShopItemScript)spawnedItem.AddComponent(typeof(ShopItemScript)); script.Cost = Random.Range(10, 50); }
void Update() { if (Input.GetKeyDown(KeyCode.E) && _isHovering) { CubyGameManager.GetInstance().AdvanceLevel(); Destroy(gameObject); } }
// Use this for initialization void Start() { CubyGameManager.GetInstance().SpawnItem(transform.position); }
// Use this for initialization void Start() { _health = GetComponent <EnemyHealth>(); _explosion = GetComponent <EnemyExplosionScript>(); _gm = CubyGameManager.GetInstance(); }