예제 #1
0
 public void SetAtHitPoint(Vector3 hitPoint)
 {
     if (_particleSystem != null && _properties != null)
     {
         AttachTransform.Detach(_particleSystem.gameObject);
         _particleSystem.transform.position = hitPoint;
     }
 }
예제 #2
0
    public void Recycle(GameObject go)
    {
        if (_active.Contains(go))
        {
            AttachTransform.Detach(go);

            _ready.Add(go);
            _active.Remove(go);
            go.transform.SetParent(GenericPoolSingleton.Instance.transform);
        }
    }
예제 #3
0
    private void OnParticleFieldAdd(MoveEditor.ParticleEventProperties properties, ParticleSystem ps, bool flipped)
    {
        CleanUpPreviewParticle();

        if (ps != null && _previewGameObject != null)
        {
            _previewParticleSystem = MoveEditor.MoveUtils.InstantiateParticle(this, properties, GetAnimator(), flipped, true);
            if (_previewParticleSystem != null)
            {
                AttachTransform.Detach(_previewParticleSystem.gameObject);
                _previewParticleSystem.transform.parent = MoveEditor.MoveUtils.GetBodyPartTransform(GetAnimator(), properties._bodyPart, properties._attachmentPath);
                Selection.activeTransform = _previewParticleSystem.transform;
            }
        }
    }
예제 #4
0
    // Shut down all systems
    public void Retire()
    {
        for (int i = _active.Count - 1; i >= 0; --i)
        {
            if (_active[i] != null)
            {
                U tri = _active[i].GetComponent <U>();
                tri.Stop();

                AttachTransform.Detach(_active[i]);

                _active[i].transform.SetParent(GenericPoolSingleton.Instance.transform);
                _ready.Add(_active[i]);
            }
            _active.RemoveAt(i);
        }
    }
예제 #5
0
    public void Update()
    {
        for (int i = _active.Count - 1; i >= 0; --i)
        {
            if (_active[i] == null)
            {
                continue;
            }
            U tri = _active[i].GetComponent <U>();
            if (tri != null && !tri.IsPlaying)
            {
                AttachTransform.Detach(_active[i]);

                _ready.Add(_active[i]);
                _active[i].transform.SetParent(GenericPoolSingleton.Instance.transform);
                _active.RemoveAt(i);
            }
        }
    }