Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
5bb4328
Option to Limit "Level Failed"
Kylemc1413 Oct 19, 2018
de81bf7
Update PracticePlugin/PracticePlugin.csproj
Kylemc1413 Oct 23, 2018
23d76f6
Disable Practice Plugin in Multiplayer
Kylemc1413 Nov 2, 2018
f4cef47
0.12.2 Update
Kylemc1413 Jan 4, 2019
76df473
Update LooperUI.cs
Kylemc1413 Jan 4, 2019
0ce9b22
Add NJS and Offset Adjustment to Practice Mode
Kylemc1413 Jan 4, 2019
8517308
Pause menu, fix seeker not initializing properly until first pause
Kylemc1413 Jan 5, 2019
85ab3a5
Version
Kylemc1413 Jan 5, 2019
d12f4ff
Don't activate practice plugin in declared isolated levels
Kylemc1413 Jan 11, 2019
ecb4bf7
4.1.2
Kylemc1413 Jan 27, 2019
d2b5424
Remove multi specific stuff
Kylemc1413 Feb 3, 2019
d244863
.
Kylemc1413 Mar 16, 2019
bde95ee
4.2.3
Kylemc1413 Mar 24, 2019
07847b6
Update README.md
Kylemc1413 Apr 3, 2019
a52786e
0.13.1
Kylemc1413 Apr 3, 2019
a1d62d8
Merge branch 'master' of https://github.com/Kylemc1413/PracticePlugin
Kylemc1413 Apr 3, 2019
6cf56fd
Update README.md
Kylemc1413 Apr 5, 2019
b2aeed3
Update to build with 4.6.1
Kylemc1413 Apr 13, 2019
f7d221e
Option to display time song was failed on results screen
Kylemc1413 Apr 19, 2019
2354029
.
Kylemc1413 May 17, 2019
b158b3f
1.1.0
Kylemc1413 Jun 10, 2019
8fcf9c7
1.3.0 fix
Kylemc1413 Aug 31, 2019
cc78fbc
4.5.1
Kylemc1413 Nov 2, 2019
d240459
Disable speed changing until fixed
Kylemc1413 Nov 2, 2019
303d1e5
Update UIElementsCreator.cs
Kylemc1413 Nov 2, 2019
2afa566
1.5.0
Kylemc1413 Nov 7, 2019
fa448c0
1.6.0 update
Kylemc1413 Dec 13, 2019
13a03d6
Update manifest.json
Kylemc1413 Dec 16, 2019
e4330b1
1.8.0
Kylemc1413 Mar 26, 2020
1046ba3
.
Kylemc1413 Apr 12, 2020
b527b0b
Modification-proofing
Kylemc1413 Apr 20, 2020
b095cc1
Null Check
Kylemc1413 Apr 20, 2020
3fcddcb
Revert "Null Check"
Kylemc1413 Apr 20, 2020
4b7611f
Revert "Modification-proofing"
Kylemc1413 Apr 20, 2020
9bda80b
Weird Solutions to weird problems
Kylemc1413 Apr 20, 2020
1f51feb
formatting
Kylemc1413 Apr 20, 2020
939f05d
Version
Kylemc1413 Apr 20, 2020
f1a0301
Fix looping
Kylemc1413 Apr 27, 2020
7be5cdb
1.11.0
Kylemc1413 Aug 17, 2020
01e38a8
Update AssemblyInfo.cs
Kylemc1413 Aug 17, 2020
8a9d404
1.12.1 Compilation Fixes
Kylemc1413 Oct 14, 2020
67b1537
Start Switching Adjustment UI to BSML, compile fixes for 1.12.1
Kylemc1413 Oct 16, 2020
e396659
Fixed seeker UI to be on curved canvas
Oct 17, 2020
cb4b3fb
Merge pull request #5 from AceofShovels/master
Kylemc1413 Oct 17, 2020
669ab8d
Functionality For UI, Seeker/Looper Cursors need Drag math fixed
Kylemc1413 Oct 18, 2020
1b21a83
Fix Seeker/Looper moving
Kylemc1413 Oct 18, 2020
d8b7148
Update SongSeeker.cs
Kylemc1413 Oct 18, 2020
ccd1bec
Merge pull request #1 from Kylemc1413/master
AceofShovels Oct 18, 2020
5c84999
Fixed Seek Bar function
Oct 18, 2020
abbe2de
Add Hovering check to looper UI
Kylemc1413 Oct 18, 2020
d9d31e1
Update manifest.json
Kylemc1413 Oct 19, 2020
1c4c5c1
Update manifest.json
Kylemc1413 Oct 20, 2020
8da7394
Fixes
Kylemc1413 Oct 21, 2020
1a097f4
Update PracticeUI.cs
Kylemc1413 Oct 21, 2020
026bed0
Update UIElementsCreator.cs
Kylemc1413 Oct 21, 2020
d20e1ab
Update SongSeekBeatmapHandler.cs
Kylemc1413 Oct 21, 2020
70ad09e
Version
Kylemc1413 Oct 21, 2020
50cc5fe
Update Plugin.cs
Kylemc1413 Oct 21, 2020
47a66ef
Update Plugin.cs
Kylemc1413 Oct 21, 2020
4801795
Update Plugin.cs
Kylemc1413 Oct 21, 2020
bb7b423
Fixes
Kylemc1413 Oct 21, 2020
1f02fdd
Version
Kylemc1413 Oct 21, 2020
2de0086
Make PracticeUI not singleton
Kylemc1413 Oct 22, 2020
a612465
Version
Kylemc1413 Oct 22, 2020
cc18e4f
Update README.md
Kylemc1413 Jan 25, 2021
119224d
Update for Beat Saber 1.13.2
Kylemc1413 Jan 25, 2021
77d42e7
Merge branch 'master' of https://github.com/Kylemc1413/PracticePlugin
Kylemc1413 Jan 25, 2021
fdcc083
Finally fix pooling issue with custom notes?
Kylemc1413 May 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions PracticePlugin/Behavior.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace PracticePlugin
{
public class Behavior : MonoBehaviour
{

void Update()
{
if (Plugin._uiElementsCreator == null || UIElementsCreator.SongSeeker == null) return;
UIElementsCreator.SongSeeker.OnUpdate();
}
}
}
53 changes: 30 additions & 23 deletions PracticePlugin/CustomEffectPoolsInstaller.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
namespace PracticePlugin
using Zenject;
namespace PracticePlugin
{
public class CustomEffectPoolsInstaller : EffectPoolsInstaller
{
public override void InstallBindings()
{
Container.BindMemoryPool<FlyingTextEffect, FlyingTextEffect.Pool>().WithInitialSize(20).FromComponentInNewPrefab(_flyingTextEffectPrefab);
Container.BindMemoryPool<FlyingScoreTextEffect, FlyingScoreTextEffect.Pool>().WithInitialSize(20)
.FromComponentInNewPrefab(_flyingScoreTextEffectPrefab);
Container.BindMemoryPool<FlyingSpriteEffect, FlyingSpriteEffect.Pool>().WithInitialSize(20)
.FromComponentInNewPrefab(_flyingSpriteEffectPrefab);
Container.BindMemoryPool<NoteDebris, NoteDebris.Pool>().WithInitialSize(30).FromComponentInNewPrefab(_noteDebrisPrefab);
Container.BindMemoryPool<BeatEffect, BeatEffect.Pool>().WithInitialSize(20).FromComponentInNewPrefab(_beatEffectPrefab);
Container.BindMemoryPool<BombCutSoundEffect, BombCutSoundEffect.Pool>().WithInitialSize(20)
.FromComponentInNewPrefab(_bombCutSoundEffectPrefab);;

Container.BindMemoryPool<NoteCutSoundEffect, NoteCutSoundEffect.Pool>().WithInitialSize(10)
.FromComponentInNewPrefab(ReplacePrefab());
}
/*
public class CustomEffectPoolsInstaller : EffectPoolsInstaller
{
public override void ManualInstallBindings(DiContainer container, bool shortBeatEffect)
{
try
{
container.BindMemoryPool<FlyingTextEffect, FlyingTextEffect.Pool>().WithInitialSize(20).FromComponentInNewPrefab(this._flyingTextEffectPrefab);
container.BindMemoryPool<FlyingScoreEffect, FlyingScoreEffect.Pool>().WithInitialSize(20).FromComponentInNewPrefab(this._flyingScoreEffectPrefab);
container.BindMemoryPool<FlyingSpriteEffect, FlyingSpriteEffect.Pool>().WithInitialSize(20).FromComponentInNewPrefab(this._flyingSpriteEffectPrefab);
container.BindMemoryPool<NoteDebris, NoteDebris.Pool>().WithInitialSize(40).FromComponentInNewPrefab(this._noteDebrisHDConditionVariable ? this._noteDebrisHDPrefab : this._noteDebrisLWPrefab);
container.BindMemoryPool<BeatEffect, BeatEffect.Pool>().WithInitialSize(20).FromComponentInNewPrefab(shortBeatEffect ? this._shortBeatEffectPrefab : this._beatEffectPrefab);
container.BindMemoryPool<NoteCutSoundEffect, NoteCutSoundEffect.Pool>().WithInitialSize(16).FromComponentInNewPrefab(this._noteCutSoundEffectPrefab);
container.BindMemoryPool<BombCutSoundEffect, BombCutSoundEffect.Pool>().WithInitialSize(20).FromComponentInNewPrefab(this._bombCutSoundEffectPrefab);
}
catch (System.Exception ex)
{
System.Console.WriteLine(ex.ToString());
}

private CustomNoteCutSoundEffect ReplacePrefab()
{
return CustomNoteCutSoundEffect.CopyOriginal(_noteCutSoundEffectPrefab);
}
}
}

private CustomNoteCutSoundEffect ReplacePrefab()
{
return CustomNoteCutSoundEffect.CopyOriginal(_noteCutSoundEffectPrefab);
}

}
*/
}
72 changes: 36 additions & 36 deletions PracticePlugin/CustomNoteCutSoundEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,43 @@

namespace PracticePlugin
{
public class CustomNoteCutSoundEffect : NoteCutSoundEffect
{
public static CustomNoteCutSoundEffect CopyOriginal(NoteCutSoundEffect original)
{
var gameObj = Instantiate(original.gameObject);
gameObj.name = "This is a copy!";
//gameObj.SetActive(false);
original = gameObj.GetComponent<NoteCutSoundEffect>();
var noteCutSoundEffect = (CustomNoteCutSoundEffect) ReflectionUtil.CopyComponent(original, typeof(NoteCutSoundEffect),
typeof(CustomNoteCutSoundEffect), gameObj);
DestroyImmediate(original);
noteCutSoundEffect.Awake();
return noteCutSoundEffect;
}
public class CustomNoteCutSoundEffect : NoteCutSoundEffect
{
public static CustomNoteCutSoundEffect CopyOriginal(NoteCutSoundEffect original)
{
var gameObj = Instantiate(original.gameObject);
gameObj.name = "This is a copy!";
//gameObj.SetActive(false);
original = gameObj.GetComponent<NoteCutSoundEffect>();
var noteCutSoundEffect = (CustomNoteCutSoundEffect)ReflectionUtil.CopyComponent(original, typeof(NoteCutSoundEffect),
typeof(CustomNoteCutSoundEffect), gameObj);
DestroyImmediate(original);
noteCutSoundEffect.Awake();
return noteCutSoundEffect;
}

public override void Awake()
{
if (_badCutSoundEffectAudioClips == null) return;
base.Awake();
}
public override void Awake()
{
if (_badCutSoundEffectAudioClips == null) return;
base.Awake();
}

public override void LateUpdate()
{
if (_audioSource.clip == null) return;
base.LateUpdate();
}
public override void LateUpdate()
{
if (_audioSource.clip == null) return;
base.LateUpdate();
}

public override void Init(AudioClip audioClip, double noteDSPTime, float aheadTime, float missedTimeOffset,
Saber saber, NoteData noteData, bool handleWrongSaberTypeAsGood)
{
base.Init(audioClip, noteDSPTime, aheadTime, missedTimeOffset, saber, noteData, handleWrongSaberTypeAsGood);
_audioSource.Stop();
var dspTime = AudioSettings.dspTime;
var timeDiff = noteDSPTime - dspTime;
timeDiff /= Plugin.TimeScale;
var newTime = dspTime + (timeDiff - aheadTime);
_audioSource.PlayScheduled(newTime);
}
}
public override void Init(AudioClip audioClip, double noteDSPTime, float aheadTime, float missedTimeOffset, float timeToPrevNote, float timeToNextNote,
Saber saber, NoteData noteData, bool handleWrongSaberTypeAsGood, float volumeMultiplier, bool ignoreSaberSpeed, bool ignoreBadCuts)
{
base.Init(audioClip, noteDSPTime, aheadTime, missedTimeOffset, timeToPrevNote, timeToNextNote, saber, noteData, handleWrongSaberTypeAsGood, volumeMultiplier, ignoreSaberSpeed, ignoreBadCuts);
_audioSource.Stop();
var dspTime = AudioSettings.dspTime;
var timeDiff = noteDSPTime - dspTime;
timeDiff /= Plugin.TimeScale;
var newTime = dspTime + (timeDiff - aheadTime);
_audioSource.PlayScheduled(newTime);
}
}
}
Loading