Пример #1
0
        protected void Awake()
        {
            cachedTransform                = transform;
            animationStateMachine          = gameObject.GetComponent <RuntimeBaseUnitSm>();
            animationStateMachine.Animator = this;

            SpeedFactor    = 1;
            FrameTime      = -1;
            m_frameIndexId = Shader.PropertyToID("frameIndex");
        }
Пример #2
0
        protected void Awake()
        {
            m_cachedTransform                = transform;
            m_meshRenderer                   = gameObject.GetComponent <MeshRenderer>();
            m_animationStateMachine          = gameObject.GetComponent <RuntimeBaseUnitSm>();
            m_animationStateMachine.Animator = this;

            m_particleBoneNames      = new List <string>();
            m_particleBoneTransforms = new List <Transform>();

            SpeedFactor = 1;
            FrameTime   = -1;
        }
Пример #3
0
 private void OnDestroy()
 {
     animationStateMachine = null;
 }