예제 #1
0
파일: Player.cs 프로젝트: moto2002/kikan
        private void AllAwake()
        {
            State         = new CharacterState();
            StateTransfer = new StateTransfer(_initState, _animator);

            Location = (IPlayerLocation) new Location(this);
            Location.InitializeFoot(_footCollider);
            Location.InitializeCenter(_centerCollider);

            Debuff = new Debuff(transform);
            Debuff.Register(DebuffType.Stun, _stunEffect);
            Debuff.Register(DebuffType.Heavy, _heavyEffect);
            Debuff.Register(DebuffType.Slow, _slowEffect);

            Stream = new PlayerStream();
            Synchronizer.SetStream(Stream);

            Character = new Character2D(this);

            Stream.OnAnimationUpdated
            .Subscribe(state => StateTransfer.TransitTo(state))
            .AddTo(gameObject);

            if (!PhotonView.isMine)
            {
                AudioEnvironment.DisableListener();
            }
        }
예제 #2
0
 public void SetStream(PlayerStream stream)
 {
     _stream = stream;
 }