private IEnumerator HandleGoopWait(CellData obj) { IntVector2 goopPosition = (obj.position.ToCenterVector2() / DeadlyDeadlyGoopManager.GOOP_GRID_SIZE).ToIntVector2(VectorConversions.Floor); if (DeadlyDeadlyGoopManager.allGoopPositionMap.ContainsKey(goopPosition)) { DeadlyDeadlyGoopManager deadlyDeadlyGoopManager = DeadlyDeadlyGoopManager.allGoopPositionMap[goopPosition]; if (deadlyDeadlyGoopManager) { while (!m_Destroyed && obj != null && deadlyDeadlyGoopManager != null && !deadlyDeadlyGoopManager.IsPositionOnFire(obj.position.ToCenterVector2()) && !m_Triggered) { if (m_Destroyed) { yield break; } yield return(null); } if (m_Destroyed) { yield break; } if (deadlyDeadlyGoopManager.IsPositionOnFire(obj.position.ToCenterVector2()) && !m_Triggered) { m_Triggered = true; OnFireStarted(); yield break; } } } yield break; }
private bool IsPointfirey(Vector2 testPos) { IntVector2 Stupidfrickinggoop = (testPos / DeadlyDeadlyGoopManager.GOOP_GRID_SIZE).ToIntVector2(VectorConversions.Floor); if (DeadlyDeadlyGoopManager.allGoopPositionMap.ContainsKey(Stupidfrickinggoop)) { DeadlyDeadlyGoopManager deadlyDeadlyGoopManager = DeadlyDeadlyGoopManager.allGoopPositionMap[Stupidfrickinggoop]; return(deadlyDeadlyGoopManager.IsPositionOnFire(testPos)); } return(false); }
private bool IsPointOnFire(Vector2 testPos) { IntVector2 Burnyoustupidbook = (testPos / DeadlyDeadlyGoopManager.GOOP_GRID_SIZE).ToIntVector2(VectorConversions.Floor); if (DeadlyDeadlyGoopManager.allGoopPositionMap.ContainsKey(Burnyoustupidbook)) { DeadlyDeadlyGoopManager deadlyDeadlyGoopManager = DeadlyDeadlyGoopManager.allGoopPositionMap[Burnyoustupidbook]; return(deadlyDeadlyGoopManager.IsPositionOnFire(testPos)); } return(false); }
private void Update() { if (GameManager.Instance.Dungeon == null) { return; } RoomHandler absoluteRoomFromPosition = self.GetAbsoluteRoom(); List <DeadlyDeadlyGoopManager> roomGoops = absoluteRoomFromPosition.RoomGoops; if (roomGoops != null) { for (int i = 0; i < roomGoops.Count; i++) { bool isOverGoop = roomGoops[i].IsPositionInGoop(self.specRigidbody.UnitCenter); if (isOverGoop) { IntVector2 goopedCellVector = (self.specRigidbody.UnitCenter / DeadlyDeadlyGoopManager.GOOP_GRID_SIZE).ToIntVector2(VectorConversions.Floor); DeadlyDeadlyGoopManager currentGoopManager = roomGoops[i]; GoopDefinition currentGoopDef = currentGoopManager.goopDefinition; if (currentGoopDef.AppliesCharm && currentGoopDef.CharmModifierEffect != null) { self.statusEffectsToApply.Add(currentGoopDef.CharmModifierEffect); if (currentGoopDef.CharmModifierEffect.AppliesTint) { self.AdjustPlayerProjectileTint(currentGoopDef.CharmModifierEffect.TintColor, 2); } } if (currentGoopDef.AppliesCheese && currentGoopDef.CheeseModifierEffect != null) { self.statusEffectsToApply.Add(currentGoopDef.CheeseModifierEffect); if (currentGoopDef.CheeseModifierEffect.AppliesTint) { self.AdjustPlayerProjectileTint(currentGoopDef.CheeseModifierEffect.TintColor, 2); } } if (currentGoopDef.AppliesDamageOverTime && currentGoopDef.HealthModifierEffect != null) { self.statusEffectsToApply.Add(currentGoopDef.HealthModifierEffect); if (currentGoopDef.HealthModifierEffect.AppliesTint) { self.AdjustPlayerProjectileTint(currentGoopDef.HealthModifierEffect.TintColor, 2); } } if ((currentGoopDef.AppliesSpeedModifier || currentGoopDef.AppliesSpeedModifierContinuously) && currentGoopDef.SpeedModifierEffect != null) { self.statusEffectsToApply.Add(currentGoopDef.SpeedModifierEffect); if (currentGoopDef.SpeedModifierEffect.AppliesTint) { self.AdjustPlayerProjectileTint(currentGoopDef.HealthModifierEffect.TintColor, 2); } } if (currentGoopDef.damagesEnemies) { self.baseData.damage += currentGoopDef.damagePerSecondtoEnemies; self.AdjustPlayerProjectileTint(currentGoopDef.baseColor32, 2); } if (currentGoopManager.IsPositionOnFire(self.specRigidbody.UnitCenter)) { self.statusEffectsToApply.Add(currentGoopDef.fireEffect); if (currentGoopDef.fireEffect.AppliesTint) { self.AdjustPlayerProjectileTint(currentGoopDef.fireEffect.TintColor, 2); } } if (currentGoopManager.IsPositionFrozen(self.specRigidbody.UnitCenter)) { self.statusEffectsToApply.Add(StaticStatusEffects.frostBulletsEffect); self.AdjustPlayerProjectileTint(ExtendedColours.frostBulletsTint, 2); } AbsorbedGoops.Add(currentGoopDef); for (int j = 0; j < StaticReferenceManager.AllGoops.Count; j++) { if (StaticReferenceManager.AllGoops[j]) { StaticReferenceManager.AllGoops[j].RemoveGoopCircle(self.specRigidbody.UnitCenter, 0.5f); } } } } } }