Exemple #1
0
 public override void Reset()
 {
     base.Reset();
     base.bStartDownloadBundle = true;
     this.RemoveAllComponent();
     this.m_eProcessStep = Nr3DCharActor.eProcessStep.DOWNLOADING;
 }
Exemple #2
0
    public void FinishDownloadRide(ref IDownloadedItem wItem)
    {
        base.downloadCounter--;
        if (this.m_kRideObject)
        {
            UnityEngine.Object.DestroyImmediate(this.m_kRideObject);
            this.m_kRideObject = null;
        }
        GameObject original = (GameObject)wItem.GetSafeBundle().mainAsset;

        this.m_kRideObject = (GameObject)UnityEngine.Object.Instantiate(original, Vector3.zero, Quaternion.identity);
        this.m_kRideObject.transform.localPosition = Vector3.zero;
        this.m_kRideObject.name = wItem.strParam;
        this.m_kRideObject.animation.playAutomatically = false;
        this.m_kRideObject.animation.Stop();
        List <AnimationClip> list = new List <AnimationClip>();

        foreach (AnimationState animationState in this.m_kRideObject.animation)
        {
            list.Add(animationState.clip);
        }
        string text = string.Empty;

        for (int i = 0; i < list.Count; i++)
        {
            AnimationClip animationClip = list[i];
            this.m_kRideObject.animation.RemoveClip(animationClip.name);
            text = this.m_szModelPath + animationClip.name + "_" + wItem.strParam;
            this.m_kRideObject.animation.AddClip(animationClip, text.ToLower());
        }
        list.Clear();
        if (this.m_eProcessStep > Nr3DCharActor.eProcessStep.RIDERIDE)
        {
            this.m_eProcessStep = Nr3DCharActor.eProcessStep.RIDERIDE;
        }
        this.m_bRideState = true;
    }