예제 #1
0
    private void ShowReadyStatus(int playerID, ReadyCount action)
    {
        int readySFX = action == ReadyCount.Add ? 2 : 6;

        M.PlaySFX(readySFX); // 2: ReadySFX | 6: UnreadySFX

        if (action == ReadyCount.Add)
        {
            readyTotal            = readyTotal >= PhotonNetwork.room.PlayerCount? PhotonNetwork.room.PlayerCount : readyTotal + 1;
            ID_to_IsRdy[playerID] = true;
        }
        else    //action == ReadyCount.Subtract
        {
            readyTotal            = readyTotal <= 0 ? 0 : readyTotal - 1;
            ID_to_IsRdy[playerID] = false;
        }
        rdyStateChange = true;
        startTimer     = CountdownLength;
    }
예제 #2
0
    private void ShowReadyStatus(int playerID, ReadyCount action)
    {
        int readySFX = action == ReadyCount.Add ? 2 : 6;

        M.PlaySFX(readySFX); // 2: ReadySFX | 6: UnreadySFX

        if (action == ReadyCount.Add)
        {
            readyTotal++;
            ID_to_IsRdy[playerID] = true;
        }
        else    //action == ReadyCount.Subtract
        {
            readyTotal--;
            ID_to_IsRdy[playerID] = false;
        }
        rdyStateChange = true;
        startTimer     = CountdownLength;
    }
예제 #3
0
파일: Room.cs 프로젝트: Logasdf/Client
        public override int GetHashCode()
        {
            int hash = 1;

            if (RoomId != 0)
            {
                hash ^= RoomId.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Limit != 0)
            {
                hash ^= Limit.GetHashCode();
            }
            if (Current != 0)
            {
                hash ^= Current.GetHashCode();
            }
            hash ^= redTeam_.GetHashCode();
            hash ^= blueTeam_.GetHashCode();
            if (ReadyCount != 0)
            {
                hash ^= ReadyCount.GetHashCode();
            }
            if (Host != 0)
            {
                hash ^= Host.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #4
0
 public void SetReadyStatus(PhotonTargets tellWho, ReadyCount action)
 {
     M_PhotonView.RPC("ShowReadyStatus", tellWho, PhotonNetwork.player.ID, action);
 }