LocalDirectionalWind.cs 506 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using UnityEngine;
  3. public class LocalDirectionalWind : LocalWind
  4. {
  5. private void Awake()
  6. {
  7. this.windRenderers = base.transform.GetComponentsInChildren<MeshRenderer>();
  8. }
  9. public override Vector2 GetDir(IBlowable blowable, Vector2 pos)
  10. {
  11. return this.direction.normalized;
  12. }
  13. public override void OnReset()
  14. {
  15. }
  16. public override void OnPause(bool isPause)
  17. {
  18. }
  19. public Vector2 direction = new Vector2(0f, 1f);
  20. private MeshRenderer[] windRenderers;
  21. }