Created
November 10, 2017 12:57
-
-
Save lycoris102/79d74e560e336f0dead80ddb103cf06a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DG.Tweening; | |
using UnityEngine; | |
[RequireComponent(typeof(ParticleSystem))] | |
public class ParticleStartSizeTween : MonoBehaviour | |
{ | |
void Start() | |
{ | |
ParticleSystem particle = this.GetComponent<ParticleSystem>(); | |
float toSize = 1.0f; | |
float duration = 10.0f; | |
DOTween.To( | |
() => particle.startSize, // 対象の値を指定 | |
it => particle.startSize = it, // 変化するitを代入 | |
toSize, // 最終値 | |
duration // 時間 | |
).Play(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment