// overrides

    public override void AssociateWithComponent(object obj)
    {
        base.AssociateWithComponent(obj);
        mComponent = (Animation)obj;

        //List<GLexAnimationClip> clips = new List<GLexAnimationClip>();
        foreach (AnimationState state in mComponent)
        {
            GLexAnimationClip clip;

            if (GLexAnimationClip.Exists(state.clip))
            {
                clip = GLexAnimationClip.Get(state.clip);
            }
            else
            {
                clip = new GLexAnimationClip(this, state.clip);
            }

            //clips.Add(clip);
            _states.Add(new GLexAnimationState(clip));
        }

        if (mGameObject.GetComponent <Renderer>() != null)
        {
            mTarget = mGameObject.GetComponent <Renderer>().gameObject;
        }
        else
        {
            mTarget = mComponent.gameObject;
        }
    }
    public GooAnimationClipChannel(GLexAnimationClip pClip, GLexBone pBone)
    {
        _clip = pClip;
        _bone = pBone;
        _id = NamesUtil.GenerateUniqueId();

        ResetCurveData();
    }
    public GooAnimationClipChannel(GLexAnimationClip pClip, GLexBone pBone)
    {
        _clip = pClip;
        _bone = pBone;
        _id   = NamesUtil.GenerateUniqueId();

        ResetCurveData();
    }
Beispiel #4
0
    public GLexData()
    {
        Instance = this;

        GLexMaterial.Reset();
        GLexMesh.Reset();
        GLexTexture.Reset();
        GLexShader.Reset();
        GLexSkinnedMeshRenderer.Reset();
        GLexBone.Reset();
        GLexAnimation.Reset();
        GLexAnimationClip.Reset();
        GLexAnimationState.Reset();
        GooSkybox.Reset();
        GLexAudioSource.Reset();
        GooSkeleton.Reset();


        mGLexGameObjects    = new List <GLexGameObject>();
        mGLexTopGameObjects = new List <GLexGameObject>();
        mGLexComponents     = new List <GLexComponent>();
    }
 public GLexAnimationState(GLexAnimationClip pClip)
 {
     _clip = pClip;
     _allAnimationStates.Add(this);
 }
 public GLexAnimationState(GLexAnimationClip pClip)
 {
     _clip = pClip;
     _allAnimationStates.Add(this);
 }
    // overrides
    public override void AssociateWithComponent(object obj)
    {
        base.AssociateWithComponent(obj);
        mComponent = (Animation)obj;

        //List<GLexAnimationClip> clips = new List<GLexAnimationClip>();
        foreach (AnimationState state in mComponent) {
            GLexAnimationClip clip;

            if (GLexAnimationClip.Exists(state.clip)) {
                clip = GLexAnimationClip.Get(state.clip);
            }
            else {
                clip = new GLexAnimationClip(this, state.clip);
            }

            //clips.Add(clip);
            _states.Add(new GLexAnimationState(clip));
        }

        if (mGameObject.GetComponent<Renderer>() != null) {
            mTarget = mGameObject.GetComponent<Renderer>().gameObject;
        }
        else {
            mTarget = mComponent.gameObject;
        }
    }