Example #1
0
    private void Awake()
    {
        spawnGameObjectBehaviour = GetComponent <SpawnGameObjectBehaviour>();
        destroyBehaviour         = GetComponent <DestroyBehaviour>();

        currentHealth = healthData.Health;
    }
Example #2
0
        // Token: 0x06000478 RID: 1144 RVA: 0x0000F2AC File Offset: 0x0000D4AC
        public void Destroy()
        {
            DestroyBehaviour.DoneWithObject(this);

            /*OnDoneBehaviour destroyBehaviour = this.DestroyBehaviour;
             * if (destroyBehaviour != OnDoneBehaviour.Disable)
             * {
             *      if (destroyBehaviour != OnDoneBehaviour.DestroyOrPool)
             *      {
             *              if (destroyBehaviour != OnDoneBehaviour.Destroy)
             *              {
             *                      return;
             *              }
             *      }
             *      else
             *      {
             *              PoolableObject component = base.GetComponent<PoolableObject>();
             *              if (component != null)
             *              {
             *                      component.ReturnToPool();
             *                      return;
             *              }
             *      }
             *      UnityEngine.Object.Destroy(base.gameObject);
             * }
             * else
             * {
             *      base.gameObject.SetActive(false);
             * }*/
        }
Example #3
0
 private void Awake()
 {
     destroyBehaviour = GetComponent <DestroyBehaviour>();
 }