Merge remote-tracking branch 'upstream/master'

This commit is contained in:
blank3times 2024-01-21 13:10:56 -08:00
commit 874a2ef881
61 changed files with 324 additions and 5592 deletions

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 5c02948e56fc801488f8e266ae84de7e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f9c0f41c6ce6e8d4e9efd06732127f2b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8a63350dadfa3364ca113259df8a333a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,12 +0,0 @@
using System;
namespace Discord
{
public partial class ActivityManager
{
public void RegisterCommand()
{
RegisterCommand(null);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6247f141a06f4c64bace3428adf1b1c3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,9 +0,0 @@
using System;
namespace Discord
{
static class Constants
{
public const string DllName = "discord_game_sdk";
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: a8beacc6f1e76b94da362fffb1e25e2e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 322f7411488994c4ba05fef35275c9ae
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,53 +0,0 @@
using System;
using System.Runtime.InteropServices;
#if UNITY_EDITOR || UNITY_STANDALONE
using UnityEngine;
#endif
namespace Discord
{
public partial struct ImageHandle
{
static public ImageHandle User(Int64 id)
{
return User(id, 128);
}
static public ImageHandle User(Int64 id, UInt32 size)
{
return new ImageHandle
{
Type = ImageType.User,
Id = id,
Size = size,
};
}
}
public partial class ImageManager
{
public void Fetch(ImageHandle handle, FetchHandler callback)
{
Fetch(handle, false, callback);
}
public byte[] GetData(ImageHandle handle)
{
var dimensions = GetDimensions(handle);
var data = new byte[dimensions.Width * dimensions.Height * 4];
GetData(handle, data);
return data;
}
#if UNITY_EDITOR || UNITY_STANDALONE
public Texture2D GetTexture(ImageHandle handle)
{
var dimensions = GetDimensions(handle);
var texture = new Texture2D((int)dimensions.Width, (int)dimensions.Height, TextureFormat.RGBA32, false, true);
texture.LoadRawTextureData(GetData(handle));
texture.Apply();
return texture;
}
#endif
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9aaaf736e0538da4d921dda51e049299
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,26 +0,0 @@
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;
namespace Discord
{
public partial class LobbyManager
{
public IEnumerable<User> GetMemberUsers(Int64 lobbyID)
{
var memberCount = MemberCount(lobbyID);
var members = new List<User>();
for (var i = 0; i < memberCount; i++)
{
members.Add(GetMemberUser(lobbyID, GetMemberUserId(lobbyID, i)));
}
return members;
}
public void SendLobbyMessage(Int64 lobbyID, string data, SendLobbyMessageHandler handler)
{
SendLobbyMessage(lobbyID, Encoding.UTF8.GetBytes(data), handler);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9f595176ca2beab4da4f6473f1a4d102
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Discord
{
public partial class StorageManager
{
public IEnumerable<FileStat> Files()
{
var fileCount = Count();
var files = new List<FileStat>();
for (var i = 0; i < fileCount; i++)
{
files.Add(StatAt(i));
}
return files;
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 0de83ab0ec089db4eb806d35d6dd9558
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,32 +0,0 @@
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;
namespace Discord
{
public partial class StoreManager
{
public IEnumerable<Entitlement> GetEntitlements()
{
var count = CountEntitlements();
var entitlements = new List<Entitlement>();
for (var i = 0; i < count; i++)
{
entitlements.Add(GetEntitlementAt(i));
}
return entitlements;
}
public IEnumerable<Sku> GetSkus()
{
var count = CountSkus();
var skus = new List<Sku>();
for (var i = 0; i < count; i++)
{
skus.Add(GetSkuAt(i));
}
return skus;
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 12e503df03fd6734d8f085997e64656c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 744658200b40eb54595b8aaf092485cc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,63 +0,0 @@
fileFormatVersion: 2
guid: 96fc096f6b288424faf79ea974b7041e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: ARM64
DefaultValueInitialized: true
OS: OSX
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: ARM64
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: x86_64
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,63 +0,0 @@
fileFormatVersion: 2
guid: 84f8495f7ca76e94c9e4bfe9675f534c
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: ARM64
DefaultValueInitialized: true
OS: OSX
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: ARM64
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: x86_64
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e291cd87df3992b40b4cb0fc5f542185
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,63 +0,0 @@
fileFormatVersion: 2
guid: ba4f73ad56fdd254c9406111c6702f84
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: x86_64
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 0d629049536dd6044b09086f92fc7305
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,52 +0,0 @@
fileFormatVersion: 2
guid: ffaf5645d42da1d40b14356395eb1bb8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,80 +0,0 @@
fileFormatVersion: 2
guid: cbdb66c634dc7af4cb711bca303d2c1a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 0
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,63 +0,0 @@
fileFormatVersion: 2
guid: f5327cb3294b2bc46a8451ef4c09a855
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 1
Exclude Win: 0
Exclude Win64: 0
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 70173042601fc1846a90b0c8ea926df4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 42267c7ce7eae61448e2ea4ecbf34463
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,63 +0,0 @@
fileFormatVersion: 2
guid: 7dc43ba202aaeee43b83eda90c7cf67b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: Windows
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 KiB

After

Width:  |  Height:  |  Size: 457 KiB

View file

@ -122,6 +122,18 @@ TextureImporter:
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:

View file

@ -143,7 +143,6 @@ MonoBehaviour:
- {fileID: 4005577975902647507}
- {fileID: 2251119349716289747}
- {fileID: 3019407148365585604}
- {fileID: 8445470951399354961}
- {fileID: -5180983858531340552}
--- !u!114 &-5180983858531340552
MonoBehaviour:
@ -333,10 +332,10 @@ MonoBehaviour:
m_Curve:
- serializedVersion: 3
time: 0
value: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
tangentMode: 34
weightedMode: 0
inWeight: 0
outWeight: 0
@ -345,7 +344,7 @@ MonoBehaviour:
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
tangentMode: 34
weightedMode: 0
inWeight: 0
outWeight: 0
@ -360,24 +359,24 @@ MonoBehaviour:
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
tangentMode: 34
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
tangentMode: 34
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_BlendInCurveMode: 0
m_BlendOutCurveMode: 0
m_BlendInCurveMode: 1
m_BlendOutCurveMode: 1
m_ExposedParameterNames: []
m_AnimationCurves: {fileID: 0}
m_Recordable: 0
@ -464,19 +463,3 @@ MonoBehaviour:
m_Retroactive: 0
m_EmitOnce: 0
m_Asset: {fileID: 11400000, guid: f5bc62bc9f451ed4a9ed997842113201, type: 2}
--- !u!114 &8445470951399354961
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
m_Name: Signal Emitter
m_EditorClassIdentifier:
m_Time: 0
m_Retroactive: 0
m_EmitOnce: 0
m_Asset: {fileID: 11400000, guid: b84f5e43721bc2e408bc902a4e02988d, type: 2}

View file

@ -362,6 +362,42 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &57158678
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 632, g: 92, b: 84, a: 0}
m_BuildTextureStacks: []
--- !u!1 &98372472
GameObject:
m_ObjectHideFlags: 0
@ -10265,42 +10301,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 272774269}
m_CullTransparentMesh: 1
--- !u!21 &353272174
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 652, g: 112, b: 96, a: 0}
m_BuildTextureStacks: []
--- !u!1 &513457786
GameObject:
m_ObjectHideFlags: 0
@ -10483,7 +10483,7 @@ PlayableDirector:
m_Enabled: 1
serializedVersion: 3
m_PlayableAsset: {fileID: 11400000, guid: 1cface0e48180cc43954bd1d6d1c6168, type: 2}
m_InitialState: 1
m_InitialState: 0
m_WrapMode: 0
m_DirectorUpdateMode: 1
m_InitialTime: 0
@ -10676,7 +10676,7 @@ AudioSource:
m_Curve:
- serializedVersion: 3
time: 0
value: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
@ -11405,7 +11405,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 1805959308}
m_Material: {fileID: 1807253055}
m_Color: {r: 0.14901961, g: 0.14901961, b: 0.14901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
@ -11558,7 +11558,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 353272174}
m_Material: {fileID: 1929755838}
m_Color: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
@ -12012,6 +12012,42 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238570285}
m_CullTransparentMesh: 1
--- !u!21 &1364499906
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 648, g: 74, b: 80, a: 0}
m_BuildTextureStacks: []
--- !u!1 &1432705147
GameObject:
m_ObjectHideFlags: 0
@ -12063,7 +12099,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2127234886}
m_Material: {fileID: 1364499906}
m_Color: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
@ -12661,7 +12697,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 1918595244}
m_Material: {fileID: 57158678}
m_Color: {r: 0.09411765, g: 0.09411765, b: 0.09411765, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
@ -13011,7 +13047,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1702256960}
m_CullTransparentMesh: 1
--- !u!21 &1805959308
--- !u!21 &1807253055
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
@ -13047,7 +13083,7 @@ Material:
m_Colors:
- _WidthHeightRadius: {r: 632, g: 34.3, b: 80, a: 0}
m_BuildTextureStacks: []
--- !u!21 &1918595244
--- !u!21 &1929755838
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
@ -13081,7 +13117,7 @@ Material:
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 632, g: 92, b: 84, a: 0}
- _WidthHeightRadius: {r: 652, g: 112, b: 96, a: 0}
m_BuildTextureStacks: []
--- !u!1 &1932988790
GameObject:
@ -13506,39 +13542,3 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2086822065}
m_CullTransparentMesh: 1
--- !u!21 &2127234886
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 648, g: 74, b: 80, a: 0}
m_BuildTextureStacks: []

View file

@ -1,114 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.Text;
using Discord;
using System;
namespace HeavenStudio.DiscordRPC
{
public class DiscordController : MonoBehaviour
{
public Discord.Discord discord;
public static DiscordController instance { get; set; }
private long lastStartTime;
private bool quitting;
private void Awake()
{
}
private void Start()
{
DontDestroyOnLoad(this.gameObject);
instance = this;
}
// private void OnApplicationQuit()
// {
// quitting = true;
// }
public void Connect()
{
discord = new Discord.Discord(DiscordRPC.clientID, (System.UInt64)Discord.CreateFlags.NoRequireDiscord);
quitting = false;
}
public void Disconnect()
{
if (discord != null)
{
discord.Dispose();
quitting = true;
}
}
public void UpdateActivity(string stateText, string stateDetails, bool updateTime = false)
{
var activityManager = discord.GetActivityManager();
var activity = new Activity { };
activity = new Activity
{
State = stateText,
Details = stateDetails,
Assets =
{
LargeImage = "logo",
LargeText = "Together now!"
},
Instance = true,
};
if (updateTime == true)
{
lastStartTime = DateTimeOffset.Now.ToUnixTimeSeconds();
activity.Timestamps.Start = lastStartTime;
}
else
{
activity.Timestamps.Start = lastStartTime;
}
activityManager.UpdateActivity(activity, (result) => {
if (result == Discord.Result.Ok)
{
Debug.Log("Update Success!");
}
else
{
Debug.Log("Update Failed");
}
});
}
public void ClearActivity()
{
var activityManager = discord.GetActivityManager();
activityManager.ClearActivity((result) => {
if (result == Discord.Result.Ok)
{
Debug.Log("Clear Success!");
}
else
{
Debug.Log("Clear Failed");
}
});
}
void Update()
{
if ((!quitting) && discord != null)
{
discord.RunCallbacks();
}
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4fda65d1df0676c49913aaa4c138c6f5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: -48
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,39 +0,0 @@
using UnityEngine;
namespace HeavenStudio.DiscordRPC
{
public class DiscordRPC : MonoBehaviour
{
public static long clientID = 945877725984477205;
private static void DiscordControllerCheck()
{
if (DiscordController.instance == null)
{
var discordController = new GameObject("DiscordController");
var di = discordController.AddComponent<DiscordController>();
DiscordController.instance = di;
di.Connect();
}
}
public static void Connect()
{
DiscordControllerCheck();
DiscordController.instance.Connect();
}
public static void UpdateActivity(string state = null, string details = null, bool updateTime = false)
{
DiscordControllerCheck();
DiscordController.instance.UpdateActivity(details, state, updateTime);
}
public static void Disconnect()
{
DiscordControllerCheck();
DiscordController.instance.Disconnect();
Destroy(DiscordController.instance.gameObject);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 896ff10d4b52e8c42ad72ec0545f8389
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -316,17 +316,24 @@ namespace HeavenStudio.Games
if (PlayerInput.GetIsAction(InputAction_Press) && !IsExpectingInputNow(InputAction_Press))
{
translator.DoScaledAnimationAsync("translator_eh", 0.5f);
if (isSpeaking)
{
if (callDiagIndex == 0)
if (noHitOnce || callDiagIndex == 0)
{
FailContact();
}
else
{
SoundByte.PlayOneShotGame("firstContact/ALIEN_PLAYER_A", -1, SoundByte.GetPitchFromSemiTones(UnityEngine.Random.Range(-3, 3), false));
TrailingContact();
ScoreMiss();
}
}
else if (!noHitOnce && !missionControl.activeInHierarchy)
{
translator.DoScaledAnimationAsync("translator_eh", 0.5f);
SoundByte.PlayOneShotGame("firstContact/ALIEN_PLAYER_MISS2_A", -1, SoundByte.GetPitchFromSemiTones(UnityEngine.Random.Range(-2, 1), false));
ScoreMiss();
}
}
}
@ -414,7 +421,7 @@ namespace HeavenStudio.Games
{
var input = inputs[i];
double relativeBeat = input.beat - intervalBeat;
ScheduleInput(beat, length + relativeBeat, InputAction_Press, AlienTapping, AlienOnMiss, AlienEmpty);
ScheduleInput(beat, length + relativeBeat, InputAction_Press, AlienTapping, AlienOnMiss, AlienEmpty, CanAlienTapping);
callDiagList.Add((input["dialogue"], input["newline"]));
}
BeatAction.New(this, new List<BeatAction.Action>()
@ -422,6 +429,7 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat, delegate
{
isSpeaking = true;
hasMissed = false;
SoundByte.PlayOneShotGame("firstContact/turnover");
alienTextbox.SetActive(false);
alien.Play("alien_point", 0, 0);
@ -582,56 +590,38 @@ namespace HeavenStudio.Games
hasMissed = true;
}
public bool CanAlienTapping()
{
return !(hasMissed || noHitOnce);
}
public void AlienTapping(PlayerActionEvent caller, float state) //OnHit
{
if (hasMissed && callDiagIndex == 0)
(string dialogue, bool showNewline) = callDiagList[callDiagIndex];
translateTextbox.SetActive(true);
if (showNewline)
{
caller.isEligible = false;
ScoreMiss();
return;
};
if (noHitOnce)
{
caller.isEligible = false;
FailContact();
return;
ResetTranslateTextbox(true);
}
if (state >= 1f || state <= -1f)
{
SoundByte.PlayOneShotGame("firstContact/ALIEN_PLAYER_A", -1, SoundByte.GetPitchFromSemiTones(UnityEngine.Random.Range(-3, 3), false));
translator.DoScaledAnimationAsync("translator_speak", 0.5f);
if (callDiagIndex == 0) return;
TrailingContact();
callDiagIndex++;
return;
}
translator.DoScaledAnimationAsync("translator_speak", 0.5f);
SoundByte.PlayOneShotGame("firstContact/ALIEN_PLAYER_A", -1, SoundByte.GetPitchFromSemiTones(UnityEngine.Random.Range(-3, 3), false));
SoundByte.PlayOneShotGame("firstContact/ALIEN_PLAYER_B");
if (hasMissed)
{
caller.isEligible = false;
return;
}
else
{
(string dialogue, bool showNewline) = callDiagList[callDiagIndex];
if (showNewline)
{
ResetTranslateTextbox(true);
}
respDiagBuffer += dialogue;
translateTextbox.SetActive(true);
UpdateTranslateTextbox();
callDiagIndex++;
}
respDiagBuffer += dialogue;
UpdateTranslateTextbox();
callDiagIndex++;
}
public void AlienOnMiss(PlayerActionEvent caller) //OnMiss
{
if (!noHitOnce)
if (!noHitOnce && !hasMissed)
{
SoundByte.PlayOneShotGame("firstContact/alienNoHit");
noHitOnce = true;

View file

@ -20,7 +20,7 @@ namespace HeavenStudio.Games.Loaders
if (datamodel == "karateman/hitX")
{
if (e["type"] == null) return null;
int newWarning = (int)e["type"];
newWarning = (e["type"] < 7) ? newWarning + 1 : 0;
@ -46,20 +46,21 @@ namespace HeavenStudio.Games.Loaders
var toRemove = e.dynamicData.Keys.Where(x => x != "track").ToList();
bool fade = e["type3"] == 3;
e.CreateProperty("presetBg", (int)e["type"]);
e.CreateProperty("startColor", e["colorA"]);
e.CreateProperty("shadowType", (int)e["type2"]);
e.CreateProperty("shadowStart", e["colorB"]);
e.CreateProperty("shadowEnd", e["colorB"]);
e.CreateProperty("textureType", (int)e["type4"]);
e.CreateProperty("autoColor", e["type5"] == (int)KarateMan.ShadowType.Tinted);
e.CreateProperty("presetBg", (int)e["type"]);
e.CreateProperty("startColor", e["colorA"]);
e.CreateProperty("shadowType", (int)e["type2"]);
e.CreateProperty("shadowStart", e["colorB"]);
e.CreateProperty("shadowEnd", e["colorB"]);
e.CreateProperty("textureType", (int)e["type4"]);
e.CreateProperty("autoColor", e["type5"] == (int)KarateMan.ShadowType.Tinted);
e.CreateProperty("startTexture", e["colorC"]);
e.CreateProperty("endTexture", e["colorC"]);
e.CreateProperty("endColor", fade ? e["colorD"] : e["colorA"]);
e.CreateProperty("ease", fade ? (int)Util.EasingFunction.Ease.Linear : (int)Util.EasingFunction.Ease.Instant);
e.CreateProperty("fxType", !fade ? (int)e["type3"] : 3);
e.CreateProperty("endTexture", e["colorC"]);
e.CreateProperty("endColor", fade ? e["colorD"] : e["colorA"]);
e.CreateProperty("ease", fade ? (int)Util.EasingFunction.Ease.Linear : (int)Util.EasingFunction.Ease.Instant);
e.CreateProperty("fxType", !fade ? (int)e["type3"] : 3);
foreach (var remove in toRemove) {
foreach (var remove in toRemove)
{
e.dynamicData.Remove(remove);
}
@ -149,7 +150,7 @@ namespace HeavenStudio.Games.Loaders
new Param("colorA", new Color(1f,1f,1f), "Custom Color", "Choose the color to use."),
new Param("type2", KarateMan.KarateManFaces.Normal, "Success Expression", "Set the facial expression for Karate Joe to show if he hits the object."),
new Param("mute", false, "Mute", "Toggle if the cue should be muted."),
new Param("sfx", KarateMan.LightBulbSfx.Automatic, "SFX", "Choose the type of SFX to use for the bulb.", new List<Param.CollapseParam>()
new Param("sfx", KarateMan.LightBulbSfx.Automatic, "SFX", "Choose the type of SFX to use for the bulb.", new List<Param.CollapseParam>()
{
new Param.CollapseParam((x, _) => (int)x == (int)KarateMan.LightBulbSfx.Custom, new string[] { "throwSfx", "hitSfx" }),
}),
@ -175,7 +176,7 @@ namespace HeavenStudio.Games.Loaders
new Param("toggle", false, "Ball", "Toggle if the barrel should contain a ball instead of a bomb."),
new Param("shouldGlow", true, "Bomb Glow", "Toggle if Joe should be lit up by the bomb in the barrel."),
new Param("type", KarateMan.KarateManFaces.Smirk, "Success Expression", "Set the facial expression for Karate Joe to show if he hits the object."),
new Param("pitchVoice", false, "Pitch Voice", "Toggle if the voice should be pitched.", new List<Param.CollapseParam>()
new Param("pitchVoice", false, "Pitch Voice", "Toggle if the voice should be pitched.", new List<Param.CollapseParam>()
{
new Param.CollapseParam((x, _) => (bool)x, new string[] { "forcePitch" }),
}),
@ -192,7 +193,7 @@ namespace HeavenStudio.Games.Loaders
var e = eventCaller.currentEntity;
KarateMan.instance.Combo(e.beat, e["type"], e["pitchVoice"], e["forcePitch"], e["cutOut"], e["disableVoice"]);
KarateMan.ComboSFX();
},
},
inactiveFunction = delegate {
var e = eventCaller.currentEntity;
KarateMan.QueueCue(e);
@ -295,7 +296,7 @@ namespace HeavenStudio.Games.Loaders
}),
new Param("shadowStart", new Color(), "Start Shadow Color", "Set the color at the start of the event."),
new Param("shadowEnd", new Color(), "End Shadow Color", "Set the color at the end of the event."),
new Param("fxType", KarateMan.BackgroundFXType.None, "FX Type", "Set the background effect to be displayed."),
new Param("textureType", KarateMan.BackgroundTextureType.Plain, "Texture", "Set the type of background texture to use", new List<Param.CollapseParam>()
@ -368,7 +369,7 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("force facial expression", "Facial Expression")
{
function = delegate { KarateMan.instance.SetFaceExpression(eventCaller.currentEntity["type"]); },
function = delegate { KarateMan.instance.SetFaceExpression(eventCaller.currentEntity["type"]); },
defaultLength = 0.5f,
resizable = true,
parameters = new List<Param>()
@ -402,9 +403,9 @@ namespace HeavenStudio.Games.Loaders
},
},
},
new List<string>() {"agb", "ntr", "rvl", "ctr", "pco", "normal"},
new List<string>() { "agb", "ntr", "rvl", "ctr", "pco", "normal" },
"karate", "en",
new List<string>() {"en"}
new List<string>() { "en" }
);
}
}
@ -503,7 +504,7 @@ namespace HeavenStudio.Games
Fire,
Rain
}
public enum KarateManFaces
{
Normal,
@ -595,10 +596,10 @@ namespace HeavenStudio.Games
//public static Queue<Beatmap.Entity> ItemQueue = new Queue<Beatmap.Entity>();
public static bool WantBop = true;
public static bool WantNori = true;
public static int WantNoriType = (int) NoriMode.None;
public static int WantNoriType = (int)NoriMode.None;
public static double WantBgChangeStart = double.MinValue;
public static float WantBgChangeLength = 0f;
const int IAAltDownCat = IAMAXCAT;
const int IAAltUpCat = IAMAXCAT + 1;
@ -697,7 +698,7 @@ namespace HeavenStudio.Games
{
instance = this;
SetupBopRegion("karateman", "bop", "toggle");
KarateManPot.ResetLastCombo();
bgEffectAnimator = BGEffect.GetComponent<Animator>();
@ -709,8 +710,6 @@ namespace HeavenStudio.Games
TintColor(BackgroundColors[0]),
new Color(),
};
Update();
}
private void Start()
@ -721,14 +720,17 @@ namespace HeavenStudio.Games
public override void OnGameSwitch(double beat)
{
// queued objects
if (queuedCues.Count > 0) {
foreach (var e in queuedCues) {
switch (e.datamodel) {
case "karateman/hit" : CreateItem(e.beat, e["type"], e["type2"]); break;
case "karateman/bulb" : CreateBulbSpecial(e.beat, e["type"], e["colorA"], e["type2"], e["sfx"], e["hitSfx"]); break;
case "karateman/kick" : Kick(e.beat, e["toggle"], e["shouldGlow"], e["type"], e["pitchVoice"], e["forcePitch"], e["cutOut"], e["disableVoice"], e["woodColor"], e["hoopColor"]); break;
if (queuedCues.Count > 0)
{
foreach (var e in queuedCues)
{
switch (e.datamodel)
{
case "karateman/hit": CreateItem(e.beat, e["type"], e["type2"]); break;
case "karateman/bulb": CreateBulbSpecial(e.beat, e["type"], e["colorA"], e["type2"], e["sfx"], e["hitSfx"]); break;
case "karateman/kick": Kick(e.beat, e["toggle"], e["shouldGlow"], e["type"], e["pitchVoice"], e["forcePitch"], e["cutOut"], e["disableVoice"], e["woodColor"], e["hoopColor"]); break;
case "karateman/combo": Combo(e.beat, e["type"], e["pitchVoice"], e["forcePitch"], e["cutOut"], e["disableVoice"]); break;
default : Debug.LogError($"Karate Man has failed to cue an object with datamodel {e.datamodel} at beat {e.beat}"); break;
default: Debug.LogError($"Karate Man has failed to cue an object with datamodel {e.datamodel} at beat {e.beat}"); break;
}
}
queuedCues.Clear();
@ -747,29 +749,36 @@ namespace HeavenStudio.Games
List<RiqEntity> prevEntities = GameManager.instance.Beatmap.Entities.FindAll(c => c.datamodel.Split(0) == "karateman");
RiqEntity voice = prevEntities.FindLast(c => c.beat < beat && c.datamodel == "karateman/warnings");
if (wordClearTime > beat && wordStartTime < beat && voice != null) {
if (wordClearTime > beat && wordStartTime < beat && voice != null)
{
DoWord(voice.beat, voice.length, voice["whichWarning"], false, 1, voice["customLength"], false);
}
// init colors
RiqEntity bg = prevEntities.FindLast(c => c.beat <= beat && c.datamodel == "karateman/background appearance");
RiqEntity obj = prevEntities.FindLast(c => c.beat <= beat && c.datamodel == "karateman/set object colors");
if (bg != null) {
if (bg != null)
{
BackgroundColor(
bg.beat, bg.length, bg["fxType"],
bg["presetBg"], bg["startColor"], bg["endColor"], bg["ease"],
bg["shadowType"], bg["shadowStart"], bg["shadowEnd"],
bg["textureType"], bg["autoColor"], bg["startTexture"], bg["endTexture"]
);
} else {
}
else
{
var c = new Color();
BackgroundColor(0, 0, 0, 0, c, c, (int)Util.EasingFunction.Ease.Instant, 0, c, c, 0, true, c, c);
}
if (obj != null) {
if (obj != null)
{
UpdateMaterialColour(obj["colorA"], obj["colorB"], obj["colorC"], obj["colorD"], obj["star"]);
} else {
}
else
{
UpdateMaterialColour(Color.white, new Color(0.81f, 0.81f, 0.81f), Color.white, Color.white, (int)StarColorOption.ItemColor);
}
@ -779,7 +788,8 @@ namespace HeavenStudio.Games
ToggleBop(0, 0, false, bop?["toggle"] ?? true);
if (flow != null) {
if (flow != null)
{
int fxType = bg == null || flow.beat > bg.beat ? flow["fxType"] : bg["fxType"];
SetGameplayMods(beat, fxType, flow["type"], flow["toggle"]);
}
@ -792,19 +802,19 @@ namespace HeavenStudio.Games
private void Update()
{
var cond = Conductor.instance;
var songPos = cond.songPositionInBeatsAsDouble;
var songPos = conductor.songPositionInBeatsAsDouble;
if (!cond.isPlaying) {
if (conductor != null && !conductor.isPlaying)
{
EntityPreCheck(songPos);
}
switch (currentBgEffect)
{
case (int) BackgroundFXType.Sunburst:
case (int)BackgroundFXType.Sunburst:
bgEffectAnimator.DoNormalizedAnimation("Sunburst", (float)(songPos * 0.5) % 1f);
break;
case (int) BackgroundFXType.Rings:
case (int)BackgroundFXType.Rings:
bgEffectAnimator.DoNormalizedAnimation("Rings", (float)(songPos * 0.5) % 1f);
break;
default:
@ -812,7 +822,8 @@ namespace HeavenStudio.Games
break;
}
if (songPos >= wordClearTime || songPos < wordStartTime) {
if (songPos >= wordClearTime || songPos < wordStartTime)
{
Word.Play("NoPose");
}
@ -823,7 +834,7 @@ namespace HeavenStudio.Games
float camZ = 0f;
if (songPos <= startCamSpecial + cameraReturnLength)
{
float prog = cond.GetPositionFromBeat(startCamSpecial, cameraReturnLength);
float prog = conductor.GetPositionFromBeat(startCamSpecial, cameraReturnLength);
camX = Util.EasingFunction.EaseOutCubic(CameraPosition[0].position.x, CameraPosition[1].position.x, prog);
camY = Util.EasingFunction.EaseOutCubic(CameraPosition[0].position.y, CameraPosition[1].position.y, prog);
camZ = Util.EasingFunction.EaseOutCubic(CameraPosition[0].position.z, CameraPosition[1].position.z, prog);
@ -831,7 +842,7 @@ namespace HeavenStudio.Games
}
else if (songPos >= wantsReturn - cameraReturnLength)
{
float prog = cond.GetPositionFromBeat(wantsReturn - cameraReturnLength, cameraReturnLength);
float prog = conductor.GetPositionFromBeat(wantsReturn - cameraReturnLength, cameraReturnLength);
camX = Util.EasingFunction.EaseOutQuad(CameraPosition[1].position.x, CameraPosition[0].position.x, prog);
camY = Util.EasingFunction.EaseOutQuad(CameraPosition[1].position.y, CameraPosition[0].position.y, prog);
camZ = Util.EasingFunction.EaseOutQuad(CameraPosition[1].position.z, CameraPosition[0].position.z, prog);
@ -856,10 +867,12 @@ namespace HeavenStudio.Games
private void OnDestroy()
{
foreach (var evt in scheduledInputs) {
foreach (var evt in scheduledInputs)
{
evt.Disable();
}
if (!Conductor.instance.NotStopped()) {
if (!Conductor.instance.NotStopped())
{
if (queuedCues.Count > 0) queuedCues.Clear();
startCamSpecial = double.MinValue;
wantsReturn = double.MinValue;
@ -888,7 +901,8 @@ namespace HeavenStudio.Games
public static string DoWordSound(double beat, double length, int type, bool bpmPitch = false, float forcePitch = 1, bool customLength = false, bool doSound = true)
{
double clear = type switch {
double clear = type switch
{
<= (int)HitThree.HitFour => beat + 4f,
<= (int)HitThree.Warning => beat + 1f,
_ => beat + 3f,
@ -907,7 +921,8 @@ namespace HeavenStudio.Games
}
var songPos = Conductor.instance.songPositionInBeatsAsDouble;
if (songPos <= clear && songPos >= beat) {
if (songPos <= clear && songPos >= beat)
{
wordClearTime = customLength ? (beat + length) : clear;
wordStartTime = beat;
}
@ -926,13 +941,15 @@ namespace HeavenStudio.Games
public static void CreateBulbSFX(double beat, int type, int sfx, string throwSfx)
{
string obj = sfx switch {
string obj = sfx switch
{
(int)LightBulbSfx.Automatic => type == (int)LightBulbType.Yellow ? "LightbulbNtr" : "Lightbulb",
(int)LightBulbSfx.DS => "LightbulbNtr",
(int)LightBulbSfx.Custom => throwSfx,
_ => "Lightbulb",
};
if (sfx != (int)LightBulbSfx.Custom) {
if (sfx != (int)LightBulbSfx.Custom)
{
obj = (beat % 1.0 == 0.5) ? $"offbeat{obj}Out" : obj.ToLower() + "Out";
}
SoundByte.PlayOneShotGame($"karateman/{obj}", forcePlay: true);
@ -942,29 +959,29 @@ namespace HeavenStudio.Games
{
switch (type)
{
case (int) HitType.Pot:
case (int)HitType.Pot:
CreateItemInstance(beat, "Item00", expression);
break;
case (int) HitType.Lightbulb:
case (int)HitType.Lightbulb:
var mobj = CreateItemInstance(beat, "Item01", expression, KarateManPot.ItemType.Bulb);
mobj.SetBulbColor(LightBulbColors[0]);
break;
case (int) HitType.Rock:
case (int)HitType.Rock:
CreateItemInstance(beat, "Item02", expression, KarateManPot.ItemType.Rock);
break;
case (int) HitType.Ball:
case (int)HitType.Ball:
CreateItemInstance(beat, "Item03", expression, KarateManPot.ItemType.Ball);
break;
case (int) HitType.CookingPot:
case (int)HitType.CookingPot:
CreateItemInstance(beat, "Item06", expression, KarateManPot.ItemType.Cooking);
break;
case (int) HitType.Alien:
case (int)HitType.Alien:
CreateItemInstance(beat, "Item07", expression, KarateManPot.ItemType.Alien);
break;
case (int) HitType.Bomb:
case (int)HitType.Bomb:
CreateItemInstance(beat, "Item04", expression, KarateManPot.ItemType.Bomb);
break;
case (int) HitType.TacoBell:
case (int)HitType.TacoBell:
CreateItemInstance(beat, "Item99", expression, KarateManPot.ItemType.TacoBell);
break;
default:
@ -975,7 +992,8 @@ namespace HeavenStudio.Games
public void CreateBulbSpecial(double beat, int type, Color color, int expression, int sfx, string hitSfx = "")
{
string obj = sfx switch {
string obj = sfx switch
{
(int)LightBulbSfx.Automatic => type == (int)LightBulbType.Yellow ? "LightbulbNtr" : "Lightbulb",
(int)LightBulbSfx.DS => "LightbulbNtr",
(int)LightBulbSfx.Custom => hitSfx,
@ -997,7 +1015,7 @@ namespace HeavenStudio.Games
int comboId = KarateManPot.GetNewCombo();
BeatAction.New(this, new List<BeatAction.Action>()
{
{
new BeatAction.Action(beat, delegate { CreateItemInstance(beat, "Item00", 0, KarateManPot.ItemType.ComboPot1, comboId); }),
new BeatAction.Action(beat + 0.25f, delegate { CreateItemInstance(beat + 0.25f, "Item00", 0, KarateManPot.ItemType.ComboPot2, comboId); }),
new BeatAction.Action(beat + 0.5f, delegate { CreateItemInstance(beat + 0.5f, "Item00", 0, KarateManPot.ItemType.ComboPot3, comboId); }),
@ -1026,7 +1044,7 @@ namespace HeavenStudio.Games
}
sounds.ForEach(x => x.pitch = bpmPitch ? Conductor.instance.GetBpmAtBeat(x.beat) / 125 : forcePitch);
MultiSound.Play(sounds.ToArray(), forcePlay: true);
}
@ -1062,7 +1080,7 @@ namespace HeavenStudio.Games
}
sounds.ForEach(x => x.pitch = bpmPitch ? Conductor.instance.GetBpmAtBeat(x.beat) / 125 : forcePitch);
MultiSound.Play(sounds.ToArray(), forcePlay: true);
}
@ -1080,15 +1098,16 @@ namespace HeavenStudio.Games
mobjDat.hitSfxOverride = hitSfxOverride;
mobj.SetActive(true);
return mobjDat;
}
public void BackgroundColor(double beat, float length, int fxType, int presetBG, Color colorStart, Color colorEnd, int colorEaseSet, int shadowType, Color shadowStart, Color shadowEnd, int textureType, bool autoColor, Color filterStart, Color filterEnd)
{
currentBgEffect = fxType;
for (int i = 0; i < colorStarts.Length; i++) {
for (int i = 0; i < colorStarts.Length; i++)
{
colorStartBeats[i] = beat;
colorLengths[i] = length;
colorEases[i] = (Util.EasingFunction.Ease)colorEaseSet;
@ -1111,7 +1130,8 @@ namespace HeavenStudio.Games
autoColor ? TintColor(bgColorEnd) : filterEnd,
};
for (int i = 0; i < BGTextures.Length; i++) {
for (int i = 0; i < BGTextures.Length; i++)
{
BGTextures[i].gameObject.SetActive(textureType == (i + 1));
}
@ -1137,7 +1157,8 @@ namespace HeavenStudio.Games
func(colorStarts[i].b, colorEnds[i].b, normalizedBeat),
};
foreach (var renderer in spriteRenderers[i]) {
foreach (var renderer in spriteRenderers[i])
{
renderer.color = new Color(color[0], color[1], color[2]);
}
}
@ -1169,7 +1190,8 @@ namespace HeavenStudio.Games
public void SetParticleEffect(double beat, int type, bool instant, float windStrength, float particleStrength)
{
if (type == (int) ParticleType.None) {
if (type == (int)ParticleType.None)
{
foreach (var eff in Effects) eff.Stop();
return;
}

View file

@ -382,6 +382,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
public void UpdateJoeColour()
{
Material mappingMat = KarateMan.instance.MappingMaterial;
if (mappingMat == null) return;
Color mainCol = KarateMan.instance.BodyColor;
Color highlightCol = KarateMan.instance.HighlightColor;
@ -391,9 +393,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
mainCol = Color.LerpUnclamped(mainCol, BombGlowTint, bombGlowIntensity * bombGlowRatio);
}
KarateMan.instance.MappingMaterial.SetColor("_ColorAlpha", mainCol);
KarateMan.instance.MappingMaterial.SetColor("_ColorBravo", new Color(1, 0, 0, 1));
KarateMan.instance.MappingMaterial.SetColor("_ColorDelta", highlightCol);
mappingMat.SetColor("_ColorAlpha", mainCol);
mappingMat.SetColor("_ColorBravo", new Color(1, 0, 0, 1));
mappingMat.SetColor("_ColorDelta", highlightCol);
}
public void Prepare(double beat, float length)

View file

@ -52,6 +52,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
public void SetNoriMode(double fromBeat, int mode, int startingNori = 0)
{
if (GameManager.instance == null) return;
float scaleFactor = 0f;
//clear all children of the holder
if (NoriHolder != null) {
@ -288,6 +289,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
void Update()
{
if (Conductor.instance == null) return;
Transform target = GameCamera.instance.transform;
Vector3 displacement = target.forward * CameraOffset;

View file

@ -267,11 +267,15 @@ namespace HeavenStudio.Games
}
}
public override void OnPlay(double beat)
{
if (queuedPoses.Count > 0) queuedPoses.Clear();
if (queuedCrouches.Count > 0) queuedCrouches.Clear();
}
void Update()
{
var cond = Conductor.instance;
if (cond.isPlaying && !cond.isPaused)
if (conductor.isPlaying && !conductor.isPaused)
{
if (queuedPoses.Count > 0)
{
@ -319,33 +323,34 @@ namespace HeavenStudio.Games
}
shouldHold = false;
}
if (PlayerInput.GetIsAction(InputAction_TouchRelease) && !GameManager.instance.autoplay)
if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch)
{
player.UnPrepare();
shouldHold = false;
}
if (PlayerInput.GetIsAction(InputAction_BasicRelease) && shouldHold && !GameManager.instance.autoplay)
{
if (doingPoses)
{
player.Pose(false);
SoundByte.PlayOneShotGame("theDazzles/miss");
foreach (var girl in npcGirls)
{
girl.Ouch();
}
}
else
if (PlayerInput.GetIsAction(InputAction_TouchRelease) && !gameManager.autoplay)
{
player.UnPrepare();
shouldHold = false;
}
}
else
{
if (PlayerInput.GetIsAction(InputAction_BasicRelease) && shouldHold && (!gameManager.autoplay) && !IsExpectingInputNow(InputAction_FlickRelease))
{
if (doingPoses)
{
player.Pose(false);
SoundByte.PlayOneShotGame("theDazzles/miss");
foreach (var girl in npcGirls)
{
girl.Ouch();
}
}
else
{
player.UnPrepare();
}
shouldHold = false;
}
shouldHold = false;
}
}
else if (!cond.isPlaying && !cond.isPaused)
{
if (queuedPoses.Count > 0) queuedPoses.Clear();
if (queuedCrouches.Count > 0) queuedCrouches.Clear();
}
}

View file

@ -466,8 +466,15 @@ namespace HeavenStudio.Games
if (passBallDict.TryGetValue(beat + lastLength, out var e))
{
if (e.datamodel == "tossBoys/pop") return;
curReceiver = e["who"];
blurSet = e.datamodel == "tossBoys/blur";
if (blurSet)
{
curReceiver = (int)WhichTossKid.None;
}
else
{
curReceiver = e["who"];
}
currentLength = e.length;
nextIsSpecial = IsSpecialEvent(e.datamodel);
eventDatamodel = e.datamodel;

View file

@ -399,20 +399,35 @@ namespace HeavenStudio
height = (int)(width / 16f * 9f);
}
GameRenderTexture.Release();
if (GameRenderTexture != null)
{
GameRenderTexture.Release();
GameRenderTexture.width = width;
GameRenderTexture.height = height;
GameRenderTexture.width = width;
GameRenderTexture.height = height;
GameRenderTexture.Create();
GameRenderTexture.Create();
}
else
{
GameRenderTexture = new RenderTexture(width, height, 24);
GameRenderTexture.Create();
}
if (OverlayRenderTexture != null)
{
OverlayRenderTexture.Release();
OverlayRenderTexture.Release();
OverlayRenderTexture.width = (int)(width * 1.5f);
OverlayRenderTexture.height = (int)(height * 1.5f);
OverlayRenderTexture.width = (int)(width * 1.5f);
OverlayRenderTexture.height = (int)(height * 1.5f);
OverlayRenderTexture.Create();
OverlayRenderTexture.Create();
}
else
{
OverlayRenderTexture = new RenderTexture((int)(width * 1.5f), (int)(height * 1.5f), 24);
OverlayRenderTexture.Create();
}
}
public static void ChangeMasterVolume(float value)

View file

@ -18,8 +18,10 @@ namespace HeavenStudio
public static int InitInputControllers()
{
inputDevices = new List<InputController>();
InputController[] controllers;
PlayerInputRefresh = new();
PlayerInputCleanUp = null;
controllers = InputJoyshockInitializer.Initialize();
if (controllers != null)

View file

@ -13,7 +13,7 @@ using HeavenStudio.InputSystem;
namespace HeavenStudio
{
[RequireComponent(typeof(PlayableDirector), typeof(AudioSource))]
[RequireComponent(typeof(PlayableDirector), typeof(AudioSource), typeof(PlayableDirector))]
public class JudgementManager : MonoBehaviour
{
enum Rank
@ -113,6 +113,7 @@ namespace HeavenStudio
[SerializeField] Animator canvasAnim;
AudioSource audioSource;
PlayableDirector director;
List<int> usedCategories;
float[] categoryInputs;
double[] categoryScores;
@ -521,6 +522,9 @@ namespace HeavenStudio
private void Start()
{
audioSource = GetComponent<AudioSource>();
director = GetComponent<PlayableDirector>();
PrepareJudgement();
director.Play();
}
private IEnumerator WaitAndRank()

View file

@ -282,7 +282,7 @@ namespace HeavenStudio.Editor
{
Texture2D texture = DownloadHandlerTexture.GetContent(www);
rankImages[(int)i] = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
Debug.Log("Uploaded image successfully!");
Debug.Log($"Downloaded image {resource} successfully!");
}
}

View file

@ -80,8 +80,10 @@ namespace {context.TargetClass.Namespace}
sb.IndentLevel(3);
sb.Append($@"
inputDevices = new List<InputController>();
InputController[] controllers;
PlayerInputRefresh = new();
PlayerInputCleanUp = null;
");
foreach (var loadRunner in loadRunners)

View file

@ -58,7 +58,14 @@ namespace HeavenStudio.Util
if (behaviour == null || !(conductor.isPlaying || conductor.isPaused))
return;
actions[idx].function.Invoke();
try
{
actions[idx].function.Invoke();
}
catch (System.Exception e)
{
Debug.LogError($"Exception thrown while executing BeatAction: {e}");
}
idx++;
}
}

View file

@ -29,7 +29,7 @@
"com.unity.nuget.newtonsoft-json": "3.2.1",
"jillejr.newtonsoft.json-for-unity.converters": "1.5.1"
},
"hash": "03264e671d2c1761f3e5ce57c982e75c6d556a60"
"hash": "81516bd0bf64681a829ac2d807fd2180077dd3f8"
},
"com.sator-imaging.alt-source-generator": {
"version": "https://github.com/sator-imaging/Unity-AltSourceGenerator.git",

View file

@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 1.0.0
bundleVersion: 1.0.1
preloadedAssets:
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
metroInputSource: 0

View file

@ -24,5 +24,18 @@ MonoBehaviour:
- Assets/Scripts/Games/FanClub/FanClub.cs
- Assets/Scripts/GameManager.cs
- Assets/Editor/SpritesheetScaler.cs
- Assets/Scripts/USG.g/LoadMinigames.Minigames.MinigameLoaderGenerator.g.cs
- Assets/Scripts/Games/TheDazzles/TheDazzles.cs
- Assets/Scripts/Games/FirstContact/FirstContact.cs
- Assets/Scripts/SourceGenerators/ControllerLoaderGenerator.cs
- Assets/Scripts/InputSystem/PlayerInput.cs
- Assets/Scripts/JudgementManager.cs
- Assets/Scripts/LevelEditor/RemixPropertiesDialog/PropertyPrefabs/RatingScreenPropertyDialog.cs
- Assets/Scripts/GlobalGameManager.cs
- Assets/Scripts/Games/KarateMan/KarateMan.cs
- Assets/Scripts/Games/KarateMan/KarateManJoe.cs
- Assets/Scripts/Games/KarateMan/KarateManNoriController.cs
- Assets/Scripts/Util/BeatAction.cs
- Assets/Scripts/Games/TossBoys/TossBoys.cs
PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: []