示例#1
0
        public void DirectUpdate()
        {
            if (!_mapCoordinates.IsOutOfMap(_targetTransform.position))
            {
                return;
            }

            TeleportPlayer();
        }
示例#2
0
        public override void DirectUpdate()
        {
            if (!_mapCoordinates.IsOutOfMap(transform.position))
            {
                return;
            }

            Deactivate();
        }
示例#3
0
        private void TryDestroy()
        {
            var isOutOfMap = _mapCoordinates.IsOutOfMap(transform.position);

            if (isOutOfMap && _isJustSpawned)
            {
                return;
            }

            if (!isOutOfMap && _isJustSpawned)
            {
                _isJustSpawned = false;
                return;
            }

            if (!isOutOfMap)
            {
                return;
            }

            Deactivate();
        }