Пример #1
0
    /// ゲームスタート__第一発見者が事件を見つける。
    public async UniTask <bool> Firstdiscovery()
    {
        Debug.Log("Firstdiscovery");

        // 対象は第一発見者。
        var targetType = CardData.CardType.FirstDiscoverer;

        // 全員待機中表示。
        await AllPlayerDispWaiting(true);

        // 対象者がカード決定するまで待ち。
        foreach (var player in playingPlayerTable.Values)
        {
            if (player.IsPosseCardByType(targetType))
            {
                player.DispWaiting(false);
                var targetCard = await player.Discard_FirstDiscover();

                lastEmitPlayer = player;

                Debug.Log("第一発見者を出し、所持カードから削除する暫定対応");
                player.RemoveHundCardList(targetCard);
            }
        }
        return(true);
    }
 public Jukebox(CDPlayer cdPlayer, User user, List <CD> cdCollection, SongSelector ts)
 {
     _cdPlayer     = cdPlayer;
     _user         = user;
     _cdCollection = cdCollection;
     _ts           = ts;
 }
Пример #3
0
    public async UniTask <bool> PlayNextTurn()
    {
        var nextPlayer = GetNextPlayer();
        await nextPlayer.Discard();

        lastEmitPlayer = nextPlayer;
        return(true);
    }
Пример #4
0
        public ICar SimpleCreate()
        {
            IEngine         engine         = new Engine();
            IAirConditioner airConditioner = new AirConditioner();
            ICDPlayer       cdPlayer       = new CDPlayer();
            IControlPanel   controlPanel   = new ControlPanel(airConditioner, cdPlayer);

            return(new Car(engine, controlPanel));
        }
Пример #5
0
    public override void SetData(object data)
    {
        base.SetData(data);

        if (data is CDPlayer)
        {
            _playerData = (CDPlayer)data;
            Initiate();
        }
    }
Пример #6
0
 public FamilyCinemaFacade(Amplifier amp, Tuner tuner, DVDPlayer dvd, CDPlayer cd, Projector projector, TheaterLights lights, Screen screen, PopcornPopper popper)
 {
     this.Amp       = amp;
     this.Tuner     = tuner;
     this.DVD       = dvd;
     this.CD        = cd;
     this.Projector = projector;
     this.Lights    = lights;
     this.Screen    = screen;
     this.Popper    = popper;
 }
Пример #7
0
 /// 配る際、持ち主情報セット。
 public void SetOwner(CDPlayer owner)
 {
     thisCardOwner = owner;
 }
 public HomeTheaterFacade(Popper popper, Screen screen, CDPlayer cdPlayer)
 {
     this._popper   = popper;
     this._screen   = screen;
     this._cdPlayer = cdPlayer;
 }
Пример #9
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     if(_player != null)
     {
         _player.Dispose();
         _player = null;
     }
 }