Ejemplo n.º 1
0
        private IEnumerator HandleConversation(PlayerController interactor)
        {
            SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black);
            base.spriteAnimator.Play("talk");
            interactor.SetInputOverride("npcConversation");
            Pixelator.Instance.LerpToLetterbox(0.35f, 0.25f);
            yield return(null);

            int conversationIndex = m_allowMeToIntroduceMyself ? 0 : conversation.Count - 1;

            while (conversationIndex < conversation.Count - 1)
            {
                //   Tools.Print($"Index: {conversationIndex}");
                TextBoxManager.ClearTextBox(this.talkPoint);
                TextBoxManager.ShowTextBox(this.talkPoint.position, this.talkPoint, -1f, conversation[conversationIndex], interactor.characterAudioSpeechTag, instant: false, showContinueText: true);
                float timer = 0;
                while (!BraveInput.GetInstanceForPlayer(interactor.PlayerIDX).ActiveActions.GetActionFromType(GungeonActions.GungeonActionType.Interact).WasPressed || timer < 0.4f)
                {
                    timer += BraveTime.DeltaTime;
                    yield return(null);
                }
                conversationIndex++;
            }
            m_allowMeToIntroduceMyself = false;
            TextBoxManager.ShowTextBox(this.talkPoint.position, this.talkPoint, -1f, conversation[conversation.Count - 1], interactor.characterAudioSpeechTag, instant: false, showContinueText: true);

            GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, null, acceptText, declineText);
            int selectedResponse = -1;

            while (!GameUIRoot.Instance.GetPlayerConversationResponse(out selectedResponse))
            {
                yield return(null);
            }

            if (selectedResponse == 0)
            {
                TextBoxManager.ClearTextBox(this.talkPoint);
                base.spriteAnimator.PlayForDuration("do_effect", -1, "talk");

                while (base.spriteAnimator.CurrentFrame < 20) //play do effect anim
                {
                    yield return(null);
                }
                OnAccept?.Invoke(interactor, this.gameObject);
                base.spriteAnimator.Play("talk");
                TextBoxManager.ShowTextBox(this.talkPoint.position, this.talkPoint, 1f, "It is done...", interactor.characterAudioSpeechTag, instant: false);
                yield return(new WaitForSeconds(1f));
            }
            else
            {
                OnDecline?.Invoke(interactor, this.gameObject);
                TextBoxManager.ClearTextBox(this.talkPoint);
            }

            // Free player and run OnAccept/OnDecline actions
            interactor.ClearInputOverride("npcConversation");
            Pixelator.Instance.LerpToLetterbox(1, 0.25f);
            base.spriteAnimator.Play("idle");
        }
Ejemplo n.º 2
0
 // Token: 0x06007691 RID: 30353 RVA: 0x002E41D0 File Offset: 0x002E23D0
 private void Reappear()
 {
     base.specRigidbody.enabled   = true;
     base.sprite.renderer.enabled = true;
     SpriteOutlineManager.ToggleOutlineRenderers(base.sprite, true);
     base.specRigidbody.Reinitialize();
     PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(base.specRigidbody, null, false);
 }
Ejemplo n.º 3
0
 // Token: 0x0600769F RID: 30367 RVA: 0x002E4E22 File Offset: 0x002E3022
 public void ToggleRenderer(bool value)
 {
     base.sprite.renderer.enabled = value;
     if (!this.PreventOutline)
     {
         SpriteOutlineManager.ToggleOutlineRenderers(base.sprite, value);
     }
 }
 void Start()
 {
     talkPoint   = transform.Find("talkpoint");
     m_isToggled = false;
     SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black);
     m_canUse = true;
     spriteAnimator.Play("idle");
 }
Ejemplo n.º 5
0
 private void DisableVFX(PlayerController user)
 {
     if (user)
     {
         Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(user.sprite);
         outlineMaterial.SetColor("_OverrideColor", new Color(0f, 0f, 0f));
     }
 }
 public void OnEnteredRange(PlayerController interactor)
 {
     if (!this)
     {
         return;
     }
     SpriteOutlineManager.AddOutlineToSprite(sprite, Color.white, 0.1f, 0f, SpriteOutlineManager.OutlineType.NORMAL);
     sprite.UpdateZDepth();
 }
Ejemplo n.º 7
0
        private static void ResetToIdle(BraveBehaviour idler)
        {
            SpriteOutlineManager.RemoveOutlineFromSprite(idler.sprite, true);
            SpriteOutlineManager.AddOutlineToSprite(idler.sprite, Color.black);

            //var idle = idler.GetComponent<CharacterSelectIdleDoer>().coreIdleAnimation;
            //idler.sprite.SetSprite(idler.spriteAnimator.GetClipByName(idle).frames[0].spriteId);
            //idler.talkDoer.OnExitRange(null);
        }
Ejemplo n.º 8
0
 // Token: 0x06007CE4 RID: 31972 RVA: 0x00316033 File Offset: 0x00314233
 public void OnExitRange(PlayerController interactor)
 {
     if (!PassiveItem.IsFlagSetAtAll(typeof(CatchingMitts)) || !base.sprite || !base.projectile)
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(base.sprite, true);
     SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black);
 }
 // Token: 0x06007CE4 RID: 31972 RVA: 0x00316033 File Offset: 0x00314233
 public void OnExitRange(PlayerController interactor)
 {
     if (!PassiveItem.IsFlagSetAtAll(typeof(PickpocketGuide)))
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(base.sprite, true);
     SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black);
 }
 public void OnEnteredRange(PlayerController interactor)
 {
     if (!this | m_Interacted | ItemID == -1 | !interactor | !interactor.HasPassiveItem(ItemID) | m_TargetRoom == null)
     {
         return;
     }
     SpriteOutlineManager.AddOutlineToSprite(sprite, Color.white, 0.1f, 0f, SpriteOutlineManager.OutlineType.NORMAL);
     sprite.UpdateZDepth();
 }
 public void OnExitRange(PlayerController interactor)
 {
     if (!this | m_Interacted | ItemID == -1 | !interactor | !interactor.HasPassiveItem(ItemID) | m_TargetRoom == null)
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(sprite, false);
     sprite.UpdateZDepth();
 }
		// Token: 0x06007CE3 RID: 31971 RVA: 0x0026DAFF File Offset: 0x0026BCFF
		public void OnEnteredRange(PlayerController interactor)
		{
            if (!PassiveItem.IsFlagSetAtAll(typeof(LootersGloves)))
            {
				return;
            }
			SpriteOutlineManager.RemoveOutlineFromSprite(base.sprite, true);
			SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.white);
		}
Ejemplo n.º 13
0
 private void Start()
 {
     if (this.minimapIcon != null && !this.m_pickedUp)
     {
         this.m_minimapIconRoom     = GameManager.Instance.Dungeon.data.GetAbsoluteRoomFromPosition(base.transform.position.IntXY(VectorConversions.Floor));
         this.m_instanceMinimapIcon = Minimap.Instance.RegisterRoomIcon(this.m_minimapIconRoom, this.minimapIcon, false);
     }
     SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black, 0.1f, 0f, SpriteOutlineManager.OutlineType.NORMAL);
 }
 public void OnExitRange(PlayerController interactor)
 {
     if (!this)
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(sprite, false);
     sprite.UpdateZDepth();
 }
Ejemplo n.º 15
0
        public override void OnPostFired(PlayerController player, Gun gun)
        {
            AkSoundEngine.PostEvent("Stop_WPN_All", base.gameObject);
            gun.PreventNormalFireAudio = true;
            AkSoundEngine.PostEvent("Play_BOSS_agunim_move_01", base.gameObject);
            targetPoint = player.unadjustedAimPoint;
            if (shotcountcontroller == 1)
            {
                Projectile         projectile1 = ((Gun)ETGMod.Databases.Items[9]).DefaultModule.projectiles[0];
                GameObject         gameObject1 = SpawnManager.SpawnProjectile(projectile1.gameObject, player.sprite.WorldCenter, Quaternion.Euler(0f, 0f, (player.CurrentGun == null) ? 0f : player.CurrentGun.CurrentAngle), true);
                Projectile         component1  = gameObject1.GetComponent <Projectile>();
                BounceProjModifier bounce      = component1.GetComponent <BounceProjModifier>();
                bounce.chanceToDieOnBounce = 0;
                bounce.numberOfBounces     = 6;
                PierceProjModifier stab = component1.GetComponent <PierceProjModifier>();
                stab.MaxBossImpacts = 4;
                stab.penetration    = 6;


                bool flag = component1 != null;
                if (flag)
                {
                    component1.Owner                     = player;
                    component1.Shooter                   = player.specRigidbody;
                    component1.baseData.speed            = 10f;
                    component1.baseData.range           *= 1f;
                    component1.baseData.damage           = 12f;
                    component1.angularVelocity           = 1000f;
                    component1.projectileHitHealth       = 50;
                    component1.collidesWithProjectiles   = true;
                    component1.AdditionalScaleMultiplier = 1.2f;
                    component1.pierceMinorBreakables     = true;
                    component1.HasDefaultTint            = true;
                    component1.DefaultTintColor          = UnityEngine.Color.cyan;
                }
                current_ball        = component1;
                shotcountcontroller = 0;
                Material outline = SpriteOutlineManager.GetOutlineMaterial(gun.sprite);
                outline.SetColor("_OverrideColor", new Color(63f, 236f, 165f));
            }
            else
            {
                Vector2 vector = current_ball.sprite.WorldCenter;
                Vector2 Aim    = player.unadjustedAimPoint;
                current_ball.SendInDirection(Aim - vector, false, true);

                foreach (var projectile in GetBullets())
                {
                    projectile.baseData.speed  = projectile.baseData.speed + 5;
                    projectile.baseData.damage = projectile.baseData.damage * 1.75f;
                    projectile.angularVelocity = projectile.angularVelocity * -1;
                    projectile.Update();
                    projectile.UpdateSpeed();
                }
            }
        }
        public new void OnEnteredRange(PlayerController interactor)
        {
            if (!this)
            {
                return;
            }
            SpriteOutlineManager.RemoveOutlineFromSprite(base.sprite, false);
            SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.white);
            Vector3            offset    = new Vector3(base.sprite.GetBounds().max.x + 0.1875f, base.sprite.GetBounds().min.y, 0f);
            EncounterTrackable component = this.item.GetComponent <EncounterTrackable>();
            string             arg       = (!(component != null)) ? this.item.DisplayName : component.journalData.GetPrimaryDisplayName(false);
            string             text      = this.ModifiedPrice.ToString();

            if (this.m_baseParentShop != null)
            {
                if (this.CurrencyType == CustomShopItemController.ShopCurrencyType.META_CURRENCY)
                {
                    text += "[sprite \"hbux_text_icon\"]";
                }
                else if (this.CurrencyType == CustomShopItemController.ShopCurrencyType.COINS)
                {
                    text += "[sprite \"ui_coin\"]";
                }
                else if (this.CurrencyType == CustomShopItemController.ShopCurrencyType.KEYS)
                {
                    text += "[sprite \"ui_key\"]";
                }
                else if (this.CurrencyType == CustomShopItemController.ShopCurrencyType.BLANKS)
                {
                    text += "[sprite \"ui_blank\"]";
                }
                else if (this.CurrencyType == CustomShopItemController.ShopCurrencyType.CUSTOM)
                {
                    text += "[sprite \"" + customPriceSprite + "\"]";
                }
                else
                {
                    text += "[sprite \"ui_coin\"]";
                }
            }
            string text2;

            if ((this.m_baseParentShop && (this.m_baseParentShop.IsCapableOfBeingStolenFrom) || interactor.IsCapableOfStealing) && this.m_baseParentShop.canBeRobbed)
            {
                text2 = string.Format("[color red]{0}: {1} {2}[/color]", arg, text, StringTableManager.GetString("#STEAL"));
            }
            else
            {
                text2 = string.Format("{0}: {1}", arg, text);
            }
            GameObject gameObject          = GameUIRoot.Instance.RegisterDefaultLabel(base.transform, offset, text2);
            dfLabel    componentInChildren = gameObject.GetComponentInChildren <dfLabel>();

            componentInChildren.ColorizeSymbols = false;
            componentInChildren.ProcessMarkup   = true;
        }
Ejemplo n.º 17
0
 public void Update()
 {
     if (m_WasKicked)
     {
         if (GetAbsoluteParentRoom() == null)
         {
             m_WasKicked           = false;
             willDefinitelyExplode = true;
             SelfDestructOnKick();
         }
         FlippableCover m_Table = GetComponent <FlippableCover>();
         if (m_Table)
         {
             if (m_Table.IsBroken)
             {
                 m_WasKicked           = false;
                 willDefinitelyExplode = true;
                 SelfDestructOnKick();
             }
         }
     }
     if (m_shouldDisplayOutline)
     {
         int num;
         DungeonData.Direction inverseDirection = DungeonData.GetInverseDirection(DungeonData.GetDirectionFromIntVector2(GetFlipDirection(m_lastInteractingPlayer.specRigidbody, out num)));
         if (inverseDirection != m_lastOutlineDirection || sprite.spriteId != m_lastSpriteId)
         {
             SpriteOutlineManager.RemoveOutlineFromSprite(sprite, false);
             SpriteOutlineManager.AddSingleOutlineToSprite <tk2dSprite>(sprite, DungeonData.GetIntVector2FromDirection(inverseDirection), Color.white, 0.25f, 0f);
         }
         m_lastOutlineDirection = inverseDirection;
         m_lastSpriteId         = sprite.spriteId;
     }
     if (leavesGoopTrail && specRigidbody.Velocity.magnitude > 0.1f)
     {
         m_goopElapsed += BraveTime.DeltaTime;
         if (m_goopElapsed > goopFrequency)
         {
             m_goopElapsed -= BraveTime.DeltaTime;
             if (m_goopManager == null)
             {
                 m_goopManager = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(goopType);
             }
             m_goopManager.AddGoopCircle(sprite.WorldCenter, goopRadius + 0.1f, -1, false, -1);
         }
         if (AllowTopWallTraversal && GameManager.Instance.Dungeon.data.CheckInBoundsAndValid(sprite.WorldCenter.ToIntVector2(VectorConversions.Floor)) && GameManager.Instance.Dungeon.data[sprite.WorldCenter.ToIntVector2(VectorConversions.Floor)].IsFireplaceCell)
         {
             MinorBreakable component = GetComponent <MinorBreakable>();
             if (component && !component.IsBroken)
             {
                 component.Break(Vector2.zero);
                 GameStatsManager.Instance.SetFlag(GungeonFlags.FLAG_ROLLED_BARREL_INTO_FIREPLACE, true);
             }
         }
     }
 }
Ejemplo n.º 18
0
 public void OnExitRange(PlayerController interactor)
 {
     if (!this)
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(base.sprite, true);
     SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black, 0.1f);
     base.sprite.UpdateZDepth();
 }
 public void OnExitRange(PlayerController interactor)
 {
     if (!this)
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(m_doorLightSprite, false);
     SpriteOutlineManager.AddOutlineToSprite(m_doorLightSprite, Color.black, 0.1f, 0f, SpriteOutlineManager.OutlineType.NORMAL);
     m_doorLightSprite.UpdateZDepth();
 }
Ejemplo n.º 20
0
 private void KillBoost(PlayerController player)
 {
     if (!hasBoost)
     {
         hasBoost = true;
         AddStat(PlayerStats.StatType.Damage, 1.5f, StatModifier.ModifyMethod.MULTIPLICATIVE);
         Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(Owner.sprite);
         outlineMaterial.SetColor("_OverrideColor", new Color(252f, 56f, 56f, 50f));
     }
 }
 public void OnEnteredRange(PlayerController interactor)
 {
     if (!this | m_InUse | m_IsRecievingPlayer | m_WaitingForPlayer | m_IsLocked | m_Disabled)
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(m_doorLightSprite, false);
     SpriteOutlineManager.AddOutlineToSprite(m_doorLightSprite, Color.white, 0.1f, 0f, SpriteOutlineManager.OutlineType.NORMAL);
     m_doorLightSprite.UpdateZDepth();
 }
 private void Update()
 {
     if (GameManager.HasInstance && GameManager.Instance.Dungeon != null && GameManager.Instance.Dungeon.tileIndices != null && GameManager.Instance.Dungeon.tileIndices.tilesetId == (GlobalDungeonData.ValidTilesets)CustomValidTilesets.CHAMBERGEON)
     {
         if (this.addsOutlineToSprite && this.attemptToAddOutlineAfterCreation && !SpriteOutlineManager.HasOutline(base.sprite))
         {
             SpriteOutlineManager.AddOutlineToSprite(base.sprite, outlineColor);
         }
     }
 }
Ejemplo n.º 23
0
        private void EnableVFX(PlayerController Owner)
        {
            //Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(Owner.sprite);
            //outlineMaterial.SetColor("_OverrideColor", new Color(76f, 252f, 252f));
            //Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(Owner.sprite);
            //outlineMaterial.SetColor("_OverrideColor", new Color(0.3f, 0.988f, 0.988f));
            Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(Owner.sprite);

            outlineMaterial.SetColor("_OverrideColor", new Color(0f, 1f, 0f));
        }
 public new void OnExitRange(PlayerController interactor)
 {
     if (!this)
     {
         return;
     }
     SpriteOutlineManager.RemoveOutlineFromSprite(base.sprite, false);
     SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black, 0.1f, 0.05f, SpriteOutlineManager.OutlineType.NORMAL);
     GameUIRoot.Instance.DeregisterDefaultLabel(base.transform);
 }
		private void Start()
		{
			if (!PassiveItem.IsFlagSetAtAll(typeof(LootersGloves)))
			{
				return;
			}
			this.m_room = GameManager.Instance.Dungeon.data.GetAbsoluteRoomFromPosition(base.transform.position.IntXY(VectorConversions.Round));
			this.m_room.RegisterInteractable(this);
			SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black);
		}
Ejemplo n.º 26
0
 public void OnExitRange(PlayerController player)
 {
     if (base.sprite != null)
     {
         if (SpriteOutlineManager.HasOutline(base.sprite))
         {
             SpriteOutlineManager.RemoveOutlineFromSprite(base.sprite);
         }
         SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black);
     }
 }
Ejemplo n.º 27
0
        private void Proj(Projectile projectile)
        {
            float i = UnityEngine.Random.value;

            if (i < .05f)
            {
                projectile.baseData.damage = 75;
                Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(projectile.sprite);
                outlineMaterial.SetColor("_OverrideColor", new Color(252f, 56f, 56f, 50f));
            }
        }
Ejemplo n.º 28
0
 public void DelayedInitialization()
 {
     this.m_cooldownRemaining = 0;
     this.m_reloadRemaining   = 0;
     //this.m_extantStand = Instantiate(MinigunStand.StandPrefab, base.sprite.WorldCenter, Quaternion.identity);
     //this.m_extantStand.GetComponent<tk2dBaseSprite>().PlaceAtPositionByAnchor(base.sprite.WorldBottomLeft, tk2dBaseSprite.Anchor.UpperCenter);
     AkSoundEngine.SetSwitch("WPN_Guns", this.GunSwitchGroup, base.gameObject);
     base.StartCoroutine(this.HandleDuration());
     SpriteOutlineManager.AddOutlineToSprite(base.sprite, Color.black);
     base.StartCoroutine(this.HandleGeneration());
 }
Ejemplo n.º 29
0
 private void EndEffect(PlayerController user)
 {
     AkSoundEngine.PostEvent("Play_WPN_spellactionrevolver_reload_01", base.gameObject);
     user.sprite.renderer.enabled = true;
     SpriteOutlineManager.ToggleOutlineRenderers(user.sprite, true);
     UnityEngine.Object.Destroy(this.extentObj);
     this.extentObj = null;
     user.inventory.RemoveGunFromInventory(this.m_extantGun);
     user.inventory.GunLocked.RemoveOverride("sprun bullet");
     user.SetIsFlying(false, "spren bullet", true, false);
     user.healthHaver.IsVulnerable = true;
 }
Ejemplo n.º 30
0
 public void LateUpdate()
 {
     base.Update();
     if (this.extentObj != null)
     {
         this.extentObj.transform.position       = this.LastOwner.sprite.transform.position.XY() + this.LastOwner.sprite.GetRelativePositionFromAnchor(tk2dBaseSprite.Anchor.MiddleCenter).Rotate(this.LastOwner.sprite.transform.eulerAngles.z);
         this.LastOwner.healthHaver.IsVulnerable = false;
         this.LastOwner.sprite.renderer.enabled  = false;
         SpriteOutlineManager.ToggleOutlineRenderers(this.LastOwner.sprite, false);
         this.extentObj.transform.parent = SpawnManager.Instance.Projectiles;
     }
 }