Exemplo n.º 1
0
 public void Terminate()
 {
     if (!_isPlaying)
     {
         return;
     }
     _poolObject.Destroy();
 }
Exemplo n.º 2
0
    public void OnTriggerEnter2D(Collider2D collision)
    {
        GameObject obj = collision.gameObject;

        if (obj.tag.Equals("Player"))
        {
            //obj.GetComponent<DudeController>().Respawn();
            Time.timeScale = 0f;
        }
        else
        {
            if (destroyBlocks)
            {
                PoolObject o = obj.GetComponent <PoolObject>();
                if (o != null)
                {
                    o.Destroy();
                }
                else
                {
                    Destroy(obj);
                }
            }
        }
    }
 // Update is called once per frame
 void Update()
 {
     if (transform.position.x < destructionPoint.position.x)
     {
         if (poolObject != null)
         {
             poolObject.Destroy();
         }
         else
         {
             Debug.LogWarning("This should be a PoolObject");
             Destroy(gameObject);
         }
     }
 }
Exemplo n.º 4
0
 public void Execute(PoolObject poolObject)
 {
     poolObject.Destroy();
 }
Exemplo n.º 5
0
 public void OnDisposeObject()
 {
     PlayerAnimation.StopAnimation();
     _poolObject.Destroy();
 }
Exemplo n.º 6
0
 public void ReturnToPool()
 {
     _poolObject.Destroy();
 }
Exemplo n.º 7
0
 public void destroyTile()
 {
     poolObject.Destroy();
 }
Exemplo n.º 8
0
 public void OnDisposeObject()
 {
     StopCoroutine(_choiceDirection);
     PlayerAnimation.StopAnimation();
     _poolObject.Destroy();
 }