Exemplo n.º 1
0
    public void WaveSpawn()
    {
        int count = (alternate ? 4 : 3) + nextDeadTent;

        for (int x = 0; x < count; x++)
        {
            float      angle = ((float)x) / count;
            BulletPool obj   = BulletPool.GetObject();
            obj.spawnTime          = lastSpawn;
            obj.parentAgeAtBirth   = lastSpawn;
            obj.splitTime          = 1000f;
            obj.scheduledDeathTime = 100;
            obj.dir = new Vector3(
                -Mathf.Sin(angle * 3.141529f),
                -Mathf.Cos(angle * 3.141529f),
                0) * 2;
            obj.curve = Vector3.zero;
            obj.Init(evaluable);
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     pool.Init();
     bpool.Init();
 }
Exemplo n.º 3
0
    void Start()
    {
        Instance = this;

        BulletPool.Init();
    }