public PoolMonoBehaviour Play(string name, Vector3 position, float limitLife, Transform parent) { PoolMonoBehaviour spriteAnimation = Play(name, position, parent); KKUtilities.Delay(limitLife, () => spriteAnimation.gameObject.SetActive(false), this); return(spriteAnimation); }
/// <summary> /// 指定された地点にパーティクルを配置し、limitLife秒後にactiveをfalseにする /// </summary> public PoolMonoBehaviour Play(string name, Vector3 localPosition, Quaternion localRotation, float limitLife, Transform parent) { PoolMonoBehaviour particle = Play(name, localPosition, localRotation, parent); KKUtilities.Delay(limitLife, () => particle.gameObject.SetActive(false), this); return(particle); }
/// <summary> /// 指定された地点にパーティクルを配置し、limitLife秒後にactiveをfalseにする /// </summary> public PoolMonoBehaviour Play(string name, Vector3 position, Quaternion rotation, float limitLife) { PoolMonoBehaviour particle = Play(name, position, rotation); KKUtilities.Delay(limitLife, () => particle.gameObject.SetActive(false), this); return(particle); }
public PoolMonoBehaviour Play(string name, Vector3 position) { ObjectPool pooler = GetSpriteAnimationPooler(name); if (pooler == null) { return(null); } PoolMonoBehaviour spriteAnimation = pooler.GetInstance(); spriteAnimation.transform.parent = pooler.transform; spriteAnimation.transform.position = position; spriteAnimation.gameObject.SetActive(true); return(spriteAnimation); }
/// <summary> /// 指定された地点にパーティクルを配置する /// </summary> public PoolMonoBehaviour Play(string name, Vector3 position, Quaternion rotation) { ObjectPool pooler = GetParticlePooler(name); if (pooler == null) { return(null); } PoolMonoBehaviour particle = pooler.GetInstance(); particle.transform.parent = pooler.transform; particle.transform.position = position; particle.transform.rotation = rotation; particle.gameObject.SetActive(true); return(particle); }