Example #1
0
        private void StopTrailRendererInternal(TrailInfo trailInfo)
        {
            trailInfo._trailInstance.Stop();

            if (GenericPoolSingleton.Instance.trailPool != null)
            {
                trailInfo._trail.transform.localScale = Vector3.one;
                GenericPoolSingleton.Instance.trailPool.Recycle(trailInfo._trail);
            }

            _activeTrailRenderers.Remove(trailInfo);
        }
Example #2
0
        public IActionResult CreateTrail(TrailInfo trailInfo)
        {
            if (ModelState.IsValid)
            {
                trailFactory.Add(trailInfo);

                return(RedirectToAction("Index"));
            }
            else
            {
                return(View("NewTrail"));
            }
        }
Example #3
0
        private void RegisterTrail(GameObject t, string name, bool interruptable)
        {
            if (t != null)
            {
                TrailInfo ti = new TrailInfo();
                ti._trail         = t;
                ti._trailInstance = t.GetComponent <TrailRendererInstance>();
                ti._interruptable = interruptable;
                ti._name          = name;
                ti._clipHash      = GetCurrentAnimHash();

                _activeTrailRenderers.Add(ti);
            }
        }
Example #4
0
        public void StopTrailRenderer(string name)
        {
            if (!string.IsNullOrEmpty(name))
            {
                TrailInfo ti = _activeTrailRenderers.Find(delegate(TrailInfo t) { return(t._name == name); });

                if (ti._trail != null)
                {
                    StopTrailRendererInternal(ti);
                }
                else
                {
                    EB.Debug.LogWarning("Trying to stop a trail that does not exist: " + name);
                }
            }
        }
Example #5
0
        public IActionResult Trails(int id)
        {
            TrailInfo trailInfo = trailFactory.FindByID(id);

            return(View(trailInfo));
        }
Example #6
0
 private void FreezeTrailRendererInternal(TrailInfo trailInfo, bool freeze)
 {
     trailInfo._trailInstance.Pause(freeze);
 }