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(); } }
private void OnHeroOrChampionViewReady(Entity entity) { HeroDecal heroDecal = this.FindDecal(entity); if (heroDecal != null) { heroDecal.TrySetupView(); } }
private void OnHeroOrChampionKilled(Entity entity) { HeroDecal heroDecal = this.FindDecal(entity); if (heroDecal != null) { heroDecal.FadeToGray(); } }
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); }
public unsafe static long $Invoke7(long instance, long *args) { HeroDecal.SetupDecal((GameObject)GCHandledObjects.GCHandleToObject(*args), *(float *)(args + 1)); return(-1L); }