Exemplo n.º 1
0
    public void CommenceShellExplosion(Transform tr)
    {
        GameObject     shellExpl = PoolService.Instantiate(shellExplosion.gameObject, tr.position, tr.rotation);
        ParticleSystem ps        = shellExpl.GetComponent <ParticleSystem>();

        ps.Play();
        Destroy(ps.gameObject, 1f);
        StartCoroutine(GameobjectReturnToPoolDelay(shellExpl, 1f));
    }
Exemplo n.º 2
0
    public void CommenceTankExplosion(Transform t)
    {
        GameObject     explosionP         = PoolService.Instantiate(tankExplosion.gameObject, t.position, t.rotation);
        ParticleSystem explosionParticles = explosionP.GetComponent <ParticleSystem>();

        //ParticleSystem smokeParticles = Instantiate(explosionSmoke, t.position, t.rotation);
        explosionParticles.Play();
        //smokeParticles.Play();
        StartCoroutine(GameobjectReturnToPoolDelay(explosionP, 1f));
    }
Exemplo n.º 3
0
    public void SpawnBustedTank(Transform tankPos)
    {
        Vector3    pos        = new Vector3(tankPos.position.x, 0, tankPos.position.z);
        GameObject bustedTank = PoolService.Instantiate(BustedTankPrefab, pos, tankPos.rotation);

        if (bustedTankDelaying)
        {
            StartCoroutine(GameobjectDestroyDelay(bustedTank, 2f));
        }
    }
Exemplo n.º 4
0
 public TankController(TankView tankPrefab, TankModel tankModel, Vector3 _pos, Quaternion _rotation)
 {
     TankView = PoolService.Instantiate(tankPrefab.gameObject, _pos, _rotation);
     //TankView.SetTankDetails(tankModel);
 }
Exemplo n.º 5
0
 public TankController(EnemyView enemyPrefab, TankModel tankModel, Vector3 _pos, Quaternion _rotation)
 {
     EnemyView = PoolService.Instantiate(enemyPrefab.gameObject, _pos, _rotation);
     //EnemyView.SetEnemyDetails(tankModel);
 }