Skip to content

Commit

Permalink
Add alternative way of fixing the animation not responding bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eusth committed Feb 14, 2017
1 parent cc4919e commit 0032cdb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
17 changes: 13 additions & 4 deletions HoneySelectVR/HoneyInterpreter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using VRGIN.Core;
using VRGIN.Helpers;
using System.Linq;
using VRGIN.Controls.Tools;

namespace HoneySelectVR
{
Expand Down Expand Up @@ -56,25 +57,33 @@ protected override void OnUpdate()
{
base.OnUpdate();

RefreshActors();
}


private void RefreshActors()
{
// Refresh actors
_Actors.Clear();

// Males
foreach(var male in Character.Instance.dictMale.Values)
foreach (var male in Character.Instance.dictMale.Values)
{
if (male.LoadEnd)
{
AddActor(HoneyActor.Create<HoneyActor>(male));
}
}
foreach(var female in Character.Instance.dictFemale.Values)

// Females
foreach (var female in Character.Instance.dictFemale.Values)
{
if (female.LoadEnd)
{
AddActor(HoneyActor.Create<HoneyActor>(female));
}
}
}
}

private void AddActor(HoneyActor actor)
{
Expand All @@ -100,7 +109,7 @@ public override bool IsAllowedEffect(MonoBehaviour effect)
{
var name = effect.GetType().Name;

return !(VR.Settings as HoneySettings).EffectBlacklist.Contains(name) && name != "ConfigEffector";
return !(VR.Settings as HoneySettings).EffectBlacklist.Contains(name) && !name.Contains("ConfigEffector");
}

//public override bool IsBody(Collider collider)
Expand Down
1 change: 1 addition & 0 deletions HoneySelectVR/HoneySelectVR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void OnLevelWasInitialized(int level)
//SoundShim.Inject();
VoiceShim.Inject();

// [PLAY TOOL ANIMATIONS] Ver 1
var scene = GameObject.FindObjectOfType<HScene>();
if (scene && scene.sprite)
{
Expand Down
5 changes: 5 additions & 0 deletions HoneySelectVR/PlayTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ protected override void OnUpdate()
if (tPadTouch && !tPadRelease)
{
LastTouch = Time.time;

// [PLAY TOOL ANIMATIONS] Ver 2
//var oldLockState = Cursor.lockState;
//Cursor.lockState = CursorLockMode.Locked;
//Cursor.lockState = oldLockState;

// Normalize
var magnitude = tPadPos.magnitude;
Expand Down

0 comments on commit 0032cdb

Please sign in to comment.