public void Terminate() { if (!_isPlaying) { return; } _poolObject.Destroy(); }
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); } } }
public void Execute(PoolObject poolObject) { poolObject.Destroy(); }
public void OnDisposeObject() { PlayerAnimation.StopAnimation(); _poolObject.Destroy(); }
public void ReturnToPool() { _poolObject.Destroy(); }
public void destroyTile() { poolObject.Destroy(); }
public void OnDisposeObject() { StopCoroutine(_choiceDirection); PlayerAnimation.StopAnimation(); _poolObject.Destroy(); }