public void EyesRound(bool left) { leftEye.flipX = left; leftEye.flipY = false; leftEye.sprite = SpriteCollector.GetEyeRound(); rightEye.flipX = left; rightEye.flipY = false; rightEye.sprite = SpriteCollector.GetEyeRound(); }
public void EyesSmile() { leftEye.flipX = false; leftEye.flipY = false; leftEye.sprite = SpriteCollector.GetEyeHappy(); rightEye.flipX = true; rightEye.flipY = false; rightEye.sprite = SpriteCollector.GetEyeHappy(); }
public void EyesAngry() { leftEye.flipX = true; leftEye.flipY = false; leftEye.sprite = SpriteCollector.GetEyeMad(); rightEye.flipX = false; rightEye.flipY = false; rightEye.sprite = SpriteCollector.GetEyeMad(); }
public void EyesBlink() { leftEye.flipX = false; leftEye.flipY = false; leftEye.sprite = SpriteCollector.GetEyeLine(); rightEye.flipX = false; rightEye.flipY = false; rightEye.sprite = SpriteCollector.GetEyeLine(); }
public PixScene() { #region SetStolenSpriteList GameScenesSprites = GameScene.gameSceneStatic.GetType().GetField("gameObjects", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(GameScene.gameSceneStatic) as List <Sprite>; #endregion garbageCollector = new SpriteCollector(GameScenesSprites); GameScenesSprites.Insert(0, garbageCollector); SpriteRefresher = new SpriteRefresher(SpriteViews); GameScene.gameSceneStatic.add(SpriteRefresher); }
public IEnumerator TalkCR(float t) { talkDelta = Time.time; while (t > 0) { switch (Random.Range(0, 3)) { case 0: mouth.sprite = SpriteCollector.GetMouthA(); break; case 1: mouth.sprite = SpriteCollector.GetMouthB(); break; case 2: mouth.sprite = SpriteCollector.GetMouthLine(); break; } yield return(new WaitForSeconds(0.03f)); talkDelta = Time.time - talkDelta; t -= talkDelta; talkDelta = Time.time; } yield return(null); }
public IEnumerator ShoutCR(float t) { shoutDelta = Time.time; while (t > 0) { mouth.flipY = true; switch (Random.Range(0, 3)) { case 0: mouth.sprite = SpriteCollector.GetMouthA(); break; case 1: mouth.sprite = SpriteCollector.GetMouthB(); break; case 2: mouth.sprite = SpriteCollector.GetMouthLine(); break; } yield return(new WaitForSeconds(0.03f)); shoutDelta = Time.time - shoutDelta; t -= shoutDelta; shoutDelta = Time.time; } yield return(null); }
public IEnumerator IdleBlinkCR(float t) { blinkDelta = Time.time; while (t > 0) { yield return(new WaitForSeconds(Random.Range(1f, 3f))); eyeState.Stash(leftEye, rightEye); EyesBlink(); yield return(new WaitForSeconds(0.05f)); // Only reset if we are still blinking if (leftEye.sprite == SpriteCollector.GetEyeLine() && rightEye.sprite == SpriteCollector.GetEyeLine()) { eyeState.Apply(leftEye, rightEye); } blinkDelta = Time.time - blinkDelta; t -= blinkDelta; blinkDelta = Time.time; } yield return(null); }
void Awake() { instance = this; }
void OnDestroy() { instance = null; }
public void MouthOh() { mouth.flipX = false; mouth.flipY = false; mouth.sprite = SpriteCollector.GetMouthRound(); }
public void MouthShock() { mouth.flipX = false; mouth.flipY = false; mouth.sprite = SpriteCollector.GetMouthShock(); }
public void MouthSad() { mouth.flipX = false; mouth.flipY = true; mouth.sprite = SpriteCollector.GetMouthB(); }
public void MouthIdle() { mouth.flipX = false; mouth.flipY = false; mouth.sprite = SpriteCollector.GetMouthA(); }