mirror of
https://github.com/ConjureETS/OuijaMTLGJ2016.git
synced 2026-03-25 18:51:07 +00:00
Fix
This commit is contained in:
parent
da8d5a0506
commit
fe98521b0d
@ -72,8 +72,12 @@ public class RuneBehaviour : MonoBehaviour {
|
|||||||
|
|
||||||
while (ratio < 1f)
|
while (ratio < 1f)
|
||||||
{
|
{
|
||||||
ratio += Time.deltaTime / LightTime;
|
// Hack
|
||||||
symbol.color = Color.Lerp(startColor, DefaultColor, ratio);
|
if (enabled)
|
||||||
|
{
|
||||||
|
ratio += Time.deltaTime / LightTime;
|
||||||
|
symbol.color = Color.Lerp(startColor, DefaultColor, ratio);
|
||||||
|
}
|
||||||
|
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using XInputDotNetPure;
|
||||||
|
|
||||||
[RequireComponent(typeof(Rigidbody))]
|
[RequireComponent(typeof(Rigidbody))]
|
||||||
public class SelectorWithBolts : MonoBehaviour
|
public class SelectorWithBolts : MonoBehaviour
|
||||||
@ -74,5 +75,26 @@ public class SelectorWithBolts : MonoBehaviour
|
|||||||
|
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StartCoroutine(VibrateController(playerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator VibrateController(int playerId)
|
||||||
|
{
|
||||||
|
GamePad.SetVibration((PlayerIndex)playerId, 1f, 1f);
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(0.5f);
|
||||||
|
|
||||||
|
GamePad.SetVibration((PlayerIndex)playerId, 0f, 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnApplicationQuit()
|
||||||
|
{
|
||||||
|
// In case the coroutine was still running when we closed the game
|
||||||
|
|
||||||
|
for (int i = 0; i < Bolts.Length; i++)
|
||||||
|
{
|
||||||
|
GamePad.SetVibration((PlayerIndex)i, 0f, 0f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user