public override void Destruction()
 {
     _manager.DestroyTextMesh(_textMesh);
     _manager.DestroyGameObject(_effectObject);
     _textMesh = null;
     _manager.RemoveVisual(this);
 }
 public override void Exit()
 {
     if (_pathObjects.Count > 0)
     {
         foreach (GameObject pathObject in _pathObjects.ToList())
         {
             _manager.DestroyGameObject(pathObject);
             _pathObjects.Remove(pathObject);
         }
     }
     if (_pathObjectsMaterials.Count > 0)
     {
         foreach (Material pathObjectMaterial in _pathObjectsMaterials.ToList())
         {
             _manager.DestroyMaterial(pathObjectMaterial);
             _pathObjectsMaterials.Remove(pathObjectMaterial);
         }
     }
 }
Exemplo n.º 3
0
    public override void DetermineIfDead()
    {
        if (_health <= 0)
        {
            _manager.DestroyMaterial(_objectMaterial);
            _manager.DestroyGameObject(_gameObject);
            _manager.RemoveEnemy(this);

            Vector3Int pos = _behaviourTree.GetBlackBoardElement <Vector3Int> (_locationFlag);
            _grid.AccessGridTile(pos.x, pos.z).SetOccupied(false);

            _behaviourTree.RemoveBlackboardElement(_locationFlag);
            _behaviourTree.RemoveBlackboardElement(_targetEntityFlag);
            _behaviourTree.RemoveBlackboardElement(_entityListFlag);
            _behaviourTree.RemoveBlackboardElement(_forwardSwingFlag);
            _behaviourTree.RemoveBlackboardElement(_getSpaceEntityListFlag);

            _behaviourTree = null;
        }
    }
 public override void DestroyGameObject()
 {
     _gameManager.DestroyMaterial(_meshObjectMaterial);
     _gameManager.DestroyGameObject(_meshObject);
 }
Exemplo n.º 5
0
 private void Destruction()
 {
     _manager.DestroyMaterial(_objectMaterial);
     _manager.DestroyGameObject(_projectileObject);
     _manager.DestroyProjectile(this as Script_IProjectile);
 }
Exemplo n.º 6
0
 public override void Destruction()
 {
     _manager.DestroyMaterial(_meshObjectMaterial);
     _manager.DestroyGameObject(_meshObject);
     _stateManager.Destruction();
 }