Ejemplo n.º 1
0
        /************************************************************************************************************************/

        private void OnEnable()
        {
            // Idle on default layer 0.
            _BasicAnimancer.Play(_Idle);
            _LayeredAnimancer.Play(_Idle);

            // Set the mask for layer 1 (this automatically creates the layer).
            _LayeredAnimancer.SetLayerMask(ActionLayer, _ActionMask);
        }
Ejemplo n.º 2
0
        public void Initialize(Controller controller)
        {
            Controller = controller;
            Anim       = GetComponent <AnimancerComponent>();

            // Set the upper body layer
            Anim.SetLayerMask(1, UpperbodyMask);
            Anim.GetLayer(1).SetWeight(1);
            // Set additive layer
            Anim.SetLayerMask(2, AdditiveMask);
            Anim.GetLayer(2).SetWeight(1);
            Anim.GetLayer(2).IsAdditive = true;

            // Setup sound source
            foreach (AudioSource source in transform.root.GetComponentsInChildren <AudioSource>())
            {
                source.spatialBlend = Networker.IsOwner ? 0.0f : 1.0f;
            }
        }