Beispiel #1
0
        public void TrySetupView()
        {
            if (this.loaded)
            {
                return;
            }
            if (this.view == null)
            {
                return;
            }
            GameObjectViewComponent gameObjectViewComponent = this.Entity.Get <GameObjectViewComponent>();

            if (gameObjectViewComponent == null)
            {
                return;
            }
            HeroDecal.SetupDecal(this.view, this.scale);
            this.view.SetActive(true);
            gameObjectViewComponent.AttachGameObject(this.name, this.view, Vector3.zero, true, true);
            this.loaded = true;
            Service.Get <ViewTimeEngine>().RegisterFrameTimeObserver(this);
            if (this.fading)
            {
                this.FadeToGray();
            }
        }
Beispiel #2
0
        private void OnHeroOrChampionViewReady(Entity entity)
        {
            HeroDecal heroDecal = this.FindDecal(entity);

            if (heroDecal != null)
            {
                heroDecal.TrySetupView();
            }
        }
Beispiel #3
0
        private void OnHeroOrChampionKilled(Entity entity)
        {
            HeroDecal heroDecal = this.FindDecal(entity);

            if (heroDecal != null)
            {
                heroDecal.FadeToGray();
            }
        }
Beispiel #4
0
        private HeroDecal FindDecal(Entity entity)
        {
            int i     = 0;
            int count = this.decals.Count;

            while (i < count)
            {
                HeroDecal heroDecal = this.decals[i];
                if (heroDecal.Entity == entity)
                {
                    return(heroDecal);
                }
                i++;
            }
            return(null);
        }
Beispiel #5
0
 public unsafe static long $Invoke7(long instance, long *args)
 {
     HeroDecal.SetupDecal((GameObject)GCHandledObjects.GCHandleToObject(*args), *(float *)(args + 1));
     return(-1L);
 }