Пример #1
0
    protected void OnCreate()
    {
        if (parent == null)//目标丢失
        {
            return;
        }
        this.start = GameTimer.time;

        duration = host.config.EndTime;
        if (this.asset is GameObject)
        {
            this.gameObject = UnityEngine.Object.Instantiate(this.asset) as GameObject;
            EffectQuality effectQuality = this.gameObject.GetComponent <EffectQuality>();
            if (effectQuality)
            {
                effectQuality.Show = true;
            }
            DestoryByTime component = this.gameObject.GetComponent <DestoryByTime>();
            if (component != null)
            {
                duration = component.time;
                Object.DestroyImmediate(component);
            }
        }
        OnInit();
        isdone = true;
    }
Пример #2
0
    public void OnCreate(UnityEngine.Object asset)
    {
        this.gameObject = UnityEngine.Object.Instantiate(asset) as GameObject;
        DestoryByTime timeDesCompoment = gameObject.GetComponent <DestoryByTime>();

        if (timeDesCompoment != null)
        {
            start_time    = Time.realtimeSinceStartup;
            duration_time = timeDesCompoment.time;
            GameObject.DestroyImmediate(timeDesCompoment);
        }
    }
Пример #3
0
    protected override void OnCreate()
    {
        this.gameObject = UnityEngine.Object.Instantiate(this.GetOwner().GetAsset()) as GameObject;

        DestoryByTime timeDesCompoment = gameObject.GetComponent <DestoryByTime>();

        if (timeDesCompoment != null)
        {
            start_time    = GameTimer.time;
            duration_time = timeDesCompoment.time;
            CClientCommon.DestroyImmediate(timeDesCompoment);
        }

        if (delayShow)
        {
            DelayShow();
        }

        SetParticleScale(ParticleScale);

        isDone = true;
    }