TinyLifeWeb/docs/api/TinyLife.Music.yml
2023-11-18 12:57:05 +01:00

510 lines
16 KiB
YAML

### YamlMime:ManagedReference
items:
- uid: TinyLife.Music
commentId: T:TinyLife.Music
id: Music
parent: TinyLife
children:
- TinyLife.Music.Duck(System.TimeSpan,System.Single)
- TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
langs:
- csharp
- vb
name: Music
nameWithType: Music
fullName: TinyLife.Music
type: Class
source:
remote:
path: TinyLife/Music.cs
branch: 0.37.5-dev
repo: https://git.ellpeck.de/Ellpeck/TinyLife
id: Music
path: ../TinyLife/Music.cs
startLine: 15
assemblies:
- Tiny Life
namespace: TinyLife
summary: "\nThis class handles the game&apos;s in-game music. To register new music tracks for being selected, use <xref href=\"TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song%2cTinyLife.Music.Occasion%5b%5d)\" data-throw-if-not-resolved=\"false\"></xref>.\n"
example: []
syntax:
content: public static class Music
content.vb: Public Module Music
inheritance:
- System.Object
inheritedMembers:
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object,System.Object)
- System.Object.GetHashCode
- System.Object.GetType
- System.Object.MemberwiseClone
- System.Object.ReferenceEquals(System.Object,System.Object)
- System.Object.ToString
- uid: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
commentId: M:TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
id: Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
parent: TinyLife.Music
langs:
- csharp
- vb
name: Register(Song, params Occasion[])
nameWithType: Music.Register(Song, params Music.Occasion[])
fullName: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song, params TinyLife.Music.Occasion[])
type: Method
source:
remote:
path: TinyLife/Music.cs
branch: 0.37.5-dev
repo: https://git.ellpeck.de/Ellpeck/TinyLife
id: Register
path: ../TinyLife/Music.cs
startLine: 45
assemblies:
- Tiny Life
namespace: TinyLife
summary: "\nRegisters a new music track to be played at the given <code data-dev-comment-type=\"paramref\" class=\"paramref\">occasions</code>.\nThe music track will be added to the music pool and randomly selected for playing.\n"
example: []
syntax:
content: public static void Register(Song song, params Music.Occasion[] occasions)
parameters:
- id: song
type: Microsoft.Xna.Framework.Media.Song
description: The song to play.
- id: occasions
type: TinyLife.Music.Occasion[]
description: The occasions that this song should be allowed to play on.
content.vb: Public Shared Sub Register(song As Song, ParamArray occasions As Music.Occasion())
overload: TinyLife.Music.Register*
exceptions:
- type: System.ArgumentException
commentId: T:System.ArgumentException
description: Thrown if <code data-dev-comment-type="paramref" class="paramref">occasions</code> is empty.
nameWithType.vb: Music.Register(Song, ParamArray Music.Occasion())
fullName.vb: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song, ParamArray TinyLife.Music.Occasion())
name.vb: Register(Song, ParamArray Occasion())
- uid: TinyLife.Music.Duck(System.TimeSpan,System.Single)
commentId: M:TinyLife.Music.Duck(System.TimeSpan,System.Single)
id: Duck(System.TimeSpan,System.Single)
parent: TinyLife.Music
langs:
- csharp
- vb
name: Duck(TimeSpan, float)
nameWithType: Music.Duck(TimeSpan, float)
fullName: TinyLife.Music.Duck(System.TimeSpan, float)
type: Method
source:
remote:
path: TinyLife/Music.cs
branch: 0.37.5-dev
repo: https://git.ellpeck.de/Ellpeck/TinyLife
id: Duck
path: ../TinyLife/Music.cs
startLine: 63
assemblies:
- Tiny Life
namespace: TinyLife
summary: "\nReduces the volume of the currently playing music to the given <code data-dev-comment-type=\"paramref\" class=\"paramref\">duckVolume</code> for the given amount of <code data-dev-comment-type=\"paramref\" class=\"paramref\">time</code>.\nThis is useful when playing a sound effect that is considered more important than the music.\n"
example: []
syntax:
content: public static void Duck(TimeSpan time, float duckVolume)
parameters:
- id: time
type: System.TimeSpan
description: The amount of time to duck for.
- id: duckVolume
type: System.Single
description: The volume to duck the music to, which is automatically multiplied by <xref href="TinyLife.Options.MusicVolume" data-throw-if-not-resolved="false"></xref>.
content.vb: Public Shared Sub Duck(time As TimeSpan, duckVolume As Single)
overload: TinyLife.Music.Duck*
nameWithType.vb: Music.Duck(TimeSpan, Single)
fullName.vb: TinyLife.Music.Duck(System.TimeSpan, Single)
name.vb: Duck(TimeSpan, Single)
references:
- uid: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
commentId: M:TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
isExternal: true
name: Register(Song, params Occasion[])
nameWithType: Music.Register(Song, params Music.Occasion[])
fullName: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song, params TinyLife.Music.Occasion[])
nameWithType.vb: Music.Register(Song, ParamArray Music.Occasion())
fullName.vb: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song, ParamArray TinyLife.Music.Occasion())
name.vb: Register(Song, ParamArray Occasion())
spec.csharp:
- uid: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
name: Register
- name: (
- uid: Microsoft.Xna.Framework.Media.Song
name: Song
isExternal: true
- name: ','
- name: " "
- name: params
- name: " "
- uid: TinyLife.Music.Occasion
name: Occasion
- name: '['
- name: ']'
- name: )
spec.vb:
- uid: TinyLife.Music.Register(Microsoft.Xna.Framework.Media.Song,TinyLife.Music.Occasion[])
name: Register
- name: (
- uid: Microsoft.Xna.Framework.Media.Song
name: Song
isExternal: true
- name: ','
- name: " "
- name: ParamArray
- name: " "
- uid: TinyLife.Music.Occasion
name: Occasion
- name: (
- name: )
- name: )
- uid: TinyLife
commentId: N:TinyLife
name: TinyLife
nameWithType: TinyLife
fullName: TinyLife
- uid: System.Object
commentId: T:System.Object
parent: System
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
name: object
nameWithType: object
fullName: object
nameWithType.vb: Object
fullName.vb: Object
name.vb: Object
- uid: System.Object.Equals(System.Object)
commentId: M:System.Object.Equals(System.Object)
parent: System.Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)
name: Equals(object)
nameWithType: object.Equals(object)
fullName: object.Equals(object)
nameWithType.vb: Object.Equals(Object)
fullName.vb: Object.Equals(Object)
name.vb: Equals(Object)
spec.csharp:
- uid: System.Object.Equals(System.Object)
name: Equals
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)
- name: (
- uid: System.Object
name: object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: )
spec.vb:
- uid: System.Object.Equals(System.Object)
name: Equals
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)
- name: (
- uid: System.Object
name: Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: )
- uid: System.Object.Equals(System.Object,System.Object)
commentId: M:System.Object.Equals(System.Object,System.Object)
parent: System.Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)
name: Equals(object, object)
nameWithType: object.Equals(object, object)
fullName: object.Equals(object, object)
nameWithType.vb: Object.Equals(Object, Object)
fullName.vb: Object.Equals(Object, Object)
name.vb: Equals(Object, Object)
spec.csharp:
- uid: System.Object.Equals(System.Object,System.Object)
name: Equals
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)
- name: (
- uid: System.Object
name: object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: ','
- name: " "
- uid: System.Object
name: object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: )
spec.vb:
- uid: System.Object.Equals(System.Object,System.Object)
name: Equals
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)
- name: (
- uid: System.Object
name: Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: ','
- name: " "
- uid: System.Object
name: Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: )
- uid: System.Object.GetHashCode
commentId: M:System.Object.GetHashCode
parent: System.Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode
name: GetHashCode()
nameWithType: object.GetHashCode()
fullName: object.GetHashCode()
nameWithType.vb: Object.GetHashCode()
fullName.vb: Object.GetHashCode()
spec.csharp:
- uid: System.Object.GetHashCode
name: GetHashCode
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode
- name: (
- name: )
spec.vb:
- uid: System.Object.GetHashCode
name: GetHashCode
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode
- name: (
- name: )
- uid: System.Object.GetType
commentId: M:System.Object.GetType
parent: System.Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.gettype
name: GetType()
nameWithType: object.GetType()
fullName: object.GetType()
nameWithType.vb: Object.GetType()
fullName.vb: Object.GetType()
spec.csharp:
- uid: System.Object.GetType
name: GetType
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.gettype
- name: (
- name: )
spec.vb:
- uid: System.Object.GetType
name: GetType
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.gettype
- name: (
- name: )
- uid: System.Object.MemberwiseClone
commentId: M:System.Object.MemberwiseClone
parent: System.Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone
name: MemberwiseClone()
nameWithType: object.MemberwiseClone()
fullName: object.MemberwiseClone()
nameWithType.vb: Object.MemberwiseClone()
fullName.vb: Object.MemberwiseClone()
spec.csharp:
- uid: System.Object.MemberwiseClone
name: MemberwiseClone
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone
- name: (
- name: )
spec.vb:
- uid: System.Object.MemberwiseClone
name: MemberwiseClone
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone
- name: (
- name: )
- uid: System.Object.ReferenceEquals(System.Object,System.Object)
commentId: M:System.Object.ReferenceEquals(System.Object,System.Object)
parent: System.Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals
name: ReferenceEquals(object, object)
nameWithType: object.ReferenceEquals(object, object)
fullName: object.ReferenceEquals(object, object)
nameWithType.vb: Object.ReferenceEquals(Object, Object)
fullName.vb: Object.ReferenceEquals(Object, Object)
name.vb: ReferenceEquals(Object, Object)
spec.csharp:
- uid: System.Object.ReferenceEquals(System.Object,System.Object)
name: ReferenceEquals
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals
- name: (
- uid: System.Object
name: object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: ','
- name: " "
- uid: System.Object
name: object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: )
spec.vb:
- uid: System.Object.ReferenceEquals(System.Object,System.Object)
name: ReferenceEquals
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals
- name: (
- uid: System.Object
name: Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: ','
- name: " "
- uid: System.Object
name: Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object
- name: )
- uid: System.Object.ToString
commentId: M:System.Object.ToString
parent: System.Object
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.tostring
name: ToString()
nameWithType: object.ToString()
fullName: object.ToString()
nameWithType.vb: Object.ToString()
fullName.vb: Object.ToString()
spec.csharp:
- uid: System.Object.ToString
name: ToString
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.tostring
- name: (
- name: )
spec.vb:
- uid: System.Object.ToString
name: ToString
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.object.tostring
- name: (
- name: )
- uid: System
commentId: N:System
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system
name: System
nameWithType: System
fullName: System
- uid: System.ArgumentException
commentId: T:System.ArgumentException
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.argumentexception
name: ArgumentException
nameWithType: ArgumentException
fullName: System.ArgumentException
- uid: TinyLife.Music.Register*
commentId: Overload:TinyLife.Music.Register
name: Register
nameWithType: Music.Register
fullName: TinyLife.Music.Register
- uid: Microsoft.Xna.Framework.Media.Song
commentId: T:Microsoft.Xna.Framework.Media.Song
parent: Microsoft.Xna.Framework.Media
isExternal: true
name: Song
nameWithType: Song
fullName: Microsoft.Xna.Framework.Media.Song
- uid: TinyLife.Music.Occasion[]
isExternal: true
name: Occasion[]
nameWithType: Music.Occasion[]
fullName: TinyLife.Music.Occasion[]
nameWithType.vb: Music.Occasion()
fullName.vb: TinyLife.Music.Occasion()
name.vb: Occasion()
spec.csharp:
- uid: TinyLife.Music.Occasion
name: Occasion
- name: '['
- name: ']'
spec.vb:
- uid: TinyLife.Music.Occasion
name: Occasion
- name: (
- name: )
- uid: Microsoft.Xna.Framework.Media
commentId: N:Microsoft.Xna.Framework.Media
isExternal: true
name: Microsoft.Xna.Framework.Media
nameWithType: Microsoft.Xna.Framework.Media
fullName: Microsoft.Xna.Framework.Media
spec.csharp:
- uid: Microsoft
name: Microsoft
isExternal: true
- name: .
- uid: Microsoft.Xna
name: Xna
isExternal: true
- name: .
- uid: Microsoft.Xna.Framework
name: Framework
isExternal: true
- name: .
- uid: Microsoft.Xna.Framework.Media
name: Media
isExternal: true
spec.vb:
- uid: Microsoft
name: Microsoft
isExternal: true
- name: .
- uid: Microsoft.Xna
name: Xna
isExternal: true
- name: .
- uid: Microsoft.Xna.Framework
name: Framework
isExternal: true
- name: .
- uid: Microsoft.Xna.Framework.Media
name: Media
isExternal: true
- uid: TinyLife.Options.MusicVolume
commentId: F:TinyLife.Options.MusicVolume
name: MusicVolume
nameWithType: Options.MusicVolume
fullName: TinyLife.Options.MusicVolume
- uid: TinyLife.Music.Duck*
commentId: Overload:TinyLife.Music.Duck
name: Duck
nameWithType: Music.Duck
fullName: TinyLife.Music.Duck
- uid: System.TimeSpan
commentId: T:System.TimeSpan
parent: System
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.timespan
name: TimeSpan
nameWithType: TimeSpan
fullName: System.TimeSpan
- uid: System.Single
commentId: T:System.Single
parent: System
isExternal: true
href: https://learn.microsoft.com/dotnet/api/system.single
name: float
nameWithType: float
fullName: float
nameWithType.vb: Single
fullName.vb: Single
name.vb: Single