示例#1
0
 private void Start()
 {
     state               = BackgroundMusicState.Intro;
     nextStartTime       = AudioSettings.dspTime + 2;
     previousOfficeState = OfficeState.Chill;
     nextClip            = GetNextClip();
     playNext(nextClip);
 }
示例#2
0
 private void UpdateOfficeState(float averagePercentageStress)
 {
     if (averagePercentageStress > officeStateRiotLevel)
     {
         state = OfficeState.Riot;
     }
     else if (averagePercentageStress > officeStateTenseLevel)
     {
         state = OfficeState.Tense;
     }
     else
     {
         state = OfficeState.Chill;
     }
 }
示例#3
0
    private AudioClip GetNextClip()
    {
        if (previousOfficeState != office.State)
        {
            state = BackgroundMusicState.Intro;
        }

        previousOfficeState = office.State;

        switch (office.State)
        {
        case OfficeState.Chill:
            if (state == BackgroundMusicState.Intro)
            {
                nextClip = chillStart;
            }
            else
            {
                nextClip = chillLoop;
            }
            break;

        case OfficeState.Tense:
            if (state == BackgroundMusicState.Intro)
            {
                nextClip = tenseStart;
            }
            else
            {
                nextClip = tenseLoop;
            }
            break;

        case OfficeState.Riot:
            nextClip = riotLoop;
            break;
        }

        if (state == BackgroundMusicState.Intro)
        {
            state = BackgroundMusicState.Loop;
        }

        return(nextClip);
    }
        public override int GetHashCode()
        {
            int hash = 1;

            if (GivenName.Length != 0)
            {
                hash ^= GivenName.GetHashCode();
            }
            if (GivenName2.Length != 0)
            {
                hash ^= GivenName2.GetHashCode();
            }
            if (FamilyName.Length != 0)
            {
                hash ^= FamilyName.GetHashCode();
            }
            if (Email.Length != 0)
            {
                hash ^= Email.GetHashCode();
            }
            if (HomePhone.Length != 0)
            {
                hash ^= HomePhone.GetHashCode();
            }
            if (MobilePhone.Length != 0)
            {
                hash ^= MobilePhone.GetHashCode();
            }
            if (FaxNumber.Length != 0)
            {
                hash ^= FaxNumber.GetHashCode();
            }
            if (OfficePhone.Length != 0)
            {
                hash ^= OfficePhone.GetHashCode();
            }
            if (OfficeAddress1.Length != 0)
            {
                hash ^= OfficeAddress1.GetHashCode();
            }
            if (OfficeAddress2.Length != 0)
            {
                hash ^= OfficeAddress2.GetHashCode();
            }
            if (OfficeCity.Length != 0)
            {
                hash ^= OfficeCity.GetHashCode();
            }
            if (OfficeState.Length != 0)
            {
                hash ^= OfficeState.GetHashCode();
            }
            if (OfficeZip.Length != 0)
            {
                hash ^= OfficeZip.GetHashCode();
            }
            if (OfficeNation.Length != 0)
            {
                hash ^= OfficeNation.GetHashCode();
            }
            if (HomeAddress1.Length != 0)
            {
                hash ^= HomeAddress1.GetHashCode();
            }
            if (HomeAddress2.Length != 0)
            {
                hash ^= HomeAddress2.GetHashCode();
            }
            if (HomeCity.Length != 0)
            {
                hash ^= HomeCity.GetHashCode();
            }
            if (HomeState.Length != 0)
            {
                hash ^= HomeState.GetHashCode();
            }
            if (HomeZip.Length != 0)
            {
                hash ^= HomeZip.GetHashCode();
            }
            if (HomeNation.Length != 0)
            {
                hash ^= HomeNation.GetHashCode();
            }
            if (CompanyName.Length != 0)
            {
                hash ^= CompanyName.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (FirstName.Length != 0)
            {
                hash ^= FirstName.GetHashCode();
            }
            if (LastName.Length != 0)
            {
                hash ^= LastName.GetHashCode();
            }
            if (HomeAddress1.Length != 0)
            {
                hash ^= HomeAddress1.GetHashCode();
            }
            if (HomeAddress2.Length != 0)
            {
                hash ^= HomeAddress2.GetHashCode();
            }
            if (HomeCity.Length != 0)
            {
                hash ^= HomeCity.GetHashCode();
            }
            if (HomeState.Length != 0)
            {
                hash ^= HomeState.GetHashCode();
            }
            if (HomeZip.Length != 0)
            {
                hash ^= HomeZip.GetHashCode();
            }
            if (HomeNation.Length != 0)
            {
                hash ^= HomeNation.GetHashCode();
            }
            if (HomePhoneNumber.Length != 0)
            {
                hash ^= HomePhoneNumber.GetHashCode();
            }
            if (OfficeAddress1.Length != 0)
            {
                hash ^= OfficeAddress1.GetHashCode();
            }
            if (OfficeAddress2.Length != 0)
            {
                hash ^= OfficeAddress2.GetHashCode();
            }
            if (OfficeCity.Length != 0)
            {
                hash ^= OfficeCity.GetHashCode();
            }
            if (OfficeState.Length != 0)
            {
                hash ^= OfficeState.GetHashCode();
            }
            if (OfficeZip.Length != 0)
            {
                hash ^= OfficeZip.GetHashCode();
            }
            if (OfficeNation.Length != 0)
            {
                hash ^= OfficeNation.GetHashCode();
            }
            if (OfficePhoneNumber.Length != 0)
            {
                hash ^= OfficePhoneNumber.GetHashCode();
            }
            if (MobilePhoneNumber.Length != 0)
            {
                hash ^= MobilePhoneNumber.GetHashCode();
            }
            if (FaxNumber.Length != 0)
            {
                hash ^= FaxNumber.GetHashCode();
            }
            if (EmailAddress.Length != 0)
            {
                hash ^= EmailAddress.GetHashCode();
            }
            if (IsBlacklisted != false)
            {
                hash ^= IsBlacklisted.GetHashCode();
            }
            if (CompanyName.Length != 0)
            {
                hash ^= CompanyName.GetHashCode();
            }
            if (GivenName2.Length != 0)
            {
                hash ^= GivenName2.GetHashCode();
            }
            return(hash);
        }