Beispiel #1
0
        public void Dispose()
        {
            m_SequenceHandler?.Dispose();
            m_SequenceHandler = null;
            m_AnimatorHandler?.Dispose();
            m_AnimatorHandler = null;

            m_GraphController?.Dispose();
            m_GraphController = null;
        }
Beispiel #2
0
        public void Initialize()
        {
            Dispose();

            Blackboard.Bind(this);
            Director.AddBlackboard(Blackboard);

            m_GraphController = new AnimationGraph(name, Animator, 2);

            m_SequenceHandler        = m_GraphController.CreateMixer(2);
            m_SequenceHandler.Weight = 1f;
            if (Application.isPlaying)
            {
                m_AnimatorHandler        = m_GraphController.Add(m_AnimatorController);
                m_AnimatorHandler.Weight = 1f;
            }
        }