You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
796 B

  1. using System;
  2. using CIGEnums;
  3. using SUISS.Core;
  4. using UnityEngine;
  5. namespace SUISSEngine
  6. {
  7. public class PlingManager : MonoBehaviour
  8. {
  9. public Pling Show(PlingType plingType, Vector3 offset, Clip sound)
  10. {
  11. SingletonMonobehaviour<CIGAudioManager>.Instance.PlayClip(sound);
  12. return this.Show(plingType, offset);
  13. }
  14. public Pling Show(PlingType plingType, Vector3 offset)
  15. {
  16. Bounds bounds = this._renderer.bounds;
  17. Vector3 vector = bounds.center;
  18. vector.y = bounds.max.y;
  19. vector += offset;
  20. return SingletonMonobehaviour<OverlayManager>.Instance.CreatePling(SingletonMonobehaviour<PlingAssetCollection>.Instance.GetAsset(plingType), vector);
  21. }
  22. public const float PlingOffset = 50f;
  23. [SerializeField]
  24. private Renderer _renderer;
  25. }
  26. }