コード例 #1
0
        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);
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        /// <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);
        }