public void addState(string stateKey, AttachedEffect attachedEffect)
    {
        stateChanged = true;
        if (!attachedEffectStates.ContainsKey(stateKey))
        {
            attachedEffectStates[stateKey] = new SimplePriorityQueue <AttachedEffect>();
        }

        attachedEffectStates[stateKey].Enqueue(attachedEffect, attachedEffect.getAppliedStates()[stateKey]);
    }
    public void init(MapObjectData mobjData, IVector3 position)
    {
        _hitBulletTime.Clear();

        isDeleteObject     = false;
        _startDeleteMotion = false;

        afterLimitCallback = null;

        mapObjectData = mobjData;
        this.hp       = mobjData.hp;

#if UNITY_EDITOR
        gameObject.name = mapObjectData.id;
#endif


        _boundCenter.x = 0; _boundCenter.y = 0; _boundCenter.z = 0;
        _boundExtens.x = 160; _boundExtens.y = 160; _boundExtens.z = 160;

        setHitObject();

        transform.parent = GameManager.me.mapManager.mapStage;

        _timeLimit       = mapObjectData.timeLimit;
        _timeLimitObject = (_timeLimit > 0.0f);

        isDeleteObject = false;

        _q                 = transform.rotation;
        _v                 = _q.eulerAngles;
        _v.x               = mapObjectData.rotateX;
        _v.y               = 0.0f;
        _v.z               = 0.0f;
        _q.eulerAngles     = _v;
        transform.rotation = _q;

        position.z += ((_boundCenter.y + _boundExtens.y)) * 0.1f;

        setPositionAndTransform(position);


        if (mapObjectData.effectData != null)
        {
            foreach (AttachedEffectData aed in mapObjectData.effectData)
            {
                AttachedEffect ae = GameManager.me.effectManager.getAttachedEffect();
                _effects.Add(ae);

                _v = _v = transform.position;                //transformPosition;
                ae.init(aed, transform, _v, 0.0f);
                ae.isEnabled = true;

                if (ae.nowCollisionData != null)
                {
                    setHitObject(ae.nowCollisionData);
                }
            }
        }

        _oriLocalPos = transform.localPosition;

        isEnabled = true;
    }