コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     currentTime += Time.deltaTime;
     if (currentTime > time)
     {
         currentTime = 0;
         foreach (var barrel in enemyComponent.GetActiveBarrels())
         {
             pool.GetObjFromPool(barrel.position, barrel.rotation);
         }
     }
 }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        if (!shoot)
        {
            return;
        }

        currentTime += Time.deltaTime;
        if (currentTime > time)
        {
            currentTime = 0;
            foreach (var barrel in playerComponent.GetActiveBarrels())
            {
                pool.GetObjFromPool(barrel.position, Quaternion.identity);
            }
        }
    }