Exemplo n.º 1
0
 public void SetAtHitPoint(Vector3 hitPoint)
 {
     if (_particleSystem != null && _properties != null)
     {
         AttachTransform.Detach(_particleSystem.gameObject);
         _particleSystem.transform.position = hitPoint;
     }
 }
Exemplo n.º 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);
        }
    }
Exemplo n.º 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;
            }
        }
    }
Exemplo n.º 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);
        }
    }
Exemplo n.º 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);
            }
        }
    }