コード例 #1
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
コード例 #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);
    }
コード例 #3
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.E) && _isHovering)
     {
         CubyGameManager.GetInstance().AdvanceLevel();
         Destroy(gameObject);
     }
 }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     CubyGameManager.GetInstance().SpawnItem(transform.position);
 }
コード例 #5
0
 // Use this for initialization
 void Start()
 {
     _health    = GetComponent <EnemyHealth>();
     _explosion = GetComponent <EnemyExplosionScript>();
     _gm        = CubyGameManager.GetInstance();
 }