void Awake() { if (system == null) { system = new EffekseerSystem(); } system.InitPlugin(); soundPlayer = new EffekseerSoundPlayer(); soundPlayer.Init(gameObject); }
/// <summary xml:lang="en"> /// Plays the effect. /// <param name="name">Effect name</param> /// </summary> /// <summary xml:lang="ja"> /// エフェクトを再生 /// <param name="name">エフェクト名</param> /// </summary> public EffekseerHandle Play(EffekseerEffectAsset effectAsset) { var h = EffekseerSystem.PlayEffect(effectAsset, transform.position); h.SetRotation(transform.rotation); h.SetScale(transform.localScale); h.layer = gameObject.layer; if (speed != 1.0f) { h.speed = speed; } if (paused) { h.paused = paused; } if (shown) { h.shown = shown; } handles.Add(h); return(h); }