Beispiel #1
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
Beispiel #2
0
    // 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);
    }
Beispiel #3
0
 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();
 }