示例#1
0
    public override void OnGraphStop(Playable playable)
    {
        //if the playable is not valid, then we are destroying, and our children won't be valid either
        if (!self.IsValid())
        {
            return;
        }

        for (int i = 0; i < m_States.Count; i++)
        {
            StateInfo state = m_States[i];
            if (state == null)
            {
                continue;
            }

            if (state.fadeSpeed == 0f && state.targetWeight == 0f)
            {
                Playable input = m_Mixer.GetInput(state.index);
                if (!input.Equals(Playable.Null))
                {
                    input.ResetTime(0f);
                }
            }
        }
    }
示例#2
0
    public override void OnGraphStop(Playable playable)
    {
        //if the playable is not valid, then we are destroying, and our children won't be valid either
        if (!self.IsValid())
        {
            return;
        }

        for (int i = 0; i < m_States.Count; i++)
        {
            StateInfo state = m_States[i];
            if (state == null)
            {
                continue;
            }

            if (state.fadeSpeed == 0f && state.targetWeight == 0f)
            {
                AnimationMixerPlayable mixer = GetMixer(state.layer);
                if (mixer.Equals(AnimationMixerPlayable.Null))
                {
                    throw new Exception("Can not get mixer at layer:" + state.layer);
                }

                Playable input = mixer.GetInput(state.indexAtLayer);
                if (!input.Equals(Playable.Null))
                {
                    input.ResetTime(0f);
                }
            }
        }
    }
    public override void OnGraphStart(Playable playable)
    {
        base.OnGraphStart(playable);

        m_fatherMixerPlayable = playable.GetOutput(0);
        if (!m_fatherMixerPlayable.IsPlayableOfType <AnimationMixerPlayable>())
        {
            Debug.LogError("Get AnimationMixerPlayable Error");
        }

        //如果是第一个Clip,直接设置权重
        if (playable.Equals(m_fatherMixerPlayable.GetInput(0)))
        {
            SetWeight();
        }
    }
示例#4
0
        /// <summary>
        /// Player - 턴 종료 버튼을 눌렀을 때, Opponent - 더 이상 낼 카드가 없을 때
        /// </summary>
        public void EndTurn()
        {
            WaitEndTasks(true);

            _um.ThrowAwayHand(_currentTurn.Equals(Player) ? true: false);
            // 카드를 모두 뒤로 보낸다.
            _um.SetHands(false, false);

            ActiveTopSlot();
            if (_ts.IsUseable())
            {
                Debug.Log("TaskScheduler Useable");
                _am.PlayPlanetFullShotAnimation(Player.transform, Opponent.transform, () =>
                {
                    Debug.Log("TaskScheduler Play");
                    _ts.Play();
                });
            }
            else
            {
                TurnChange(false);
            }
        }
 public override void OnGraphStart(Playable playable)
 {
     base.OnGraphStart(playable);
     Debug.Log("START? " + ", " + playable + ", " + (playable.Equals(this.Playable)));
     playable.Play();
 }