mirror of
https://github.com/ConjureETS/OuijaMTLGJ2016.git
synced 2026-03-24 02:01:06 +00:00
Fix
This commit is contained in:
parent
da8d5a0506
commit
fe98521b0d
@ -71,9 +71,13 @@ public class RuneBehaviour : MonoBehaviour {
|
||||
float ratio = 0f;
|
||||
|
||||
while (ratio < 1f)
|
||||
{
|
||||
// Hack
|
||||
if (enabled)
|
||||
{
|
||||
ratio += Time.deltaTime / LightTime;
|
||||
symbol.color = Color.Lerp(startColor, DefaultColor, ratio);
|
||||
}
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using XInputDotNetPure;
|
||||
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
public class SelectorWithBolts : MonoBehaviour
|
||||
@ -74,5 +75,26 @@ public class SelectorWithBolts : MonoBehaviour
|
||||
|
||||
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