public static void ReportSoulCollected(SoulType soulCollected) { if (OnSoulCollected != null) { OnSoulCollected(soulCollected); } }
public override void ToggleSoul(SoulType soul) { var maxPowerSoulCount = SoulCollection.PowerSoulsCount; if (maxPowerSoulCount == 0) { return; } if (ActiveSouls.Contains(soul)) { RemoveSoul(soul); } else if (ActiveSouls.Count < maxPowerSoulCount) { AddSoul(soul); } else { RemoveFirst(); AddSoul(soul); } OnPropertyChanged(nameof(PowerSoulsCount)); OnPropertyChanged(nameof(TotalUniques)); LoadoutSouls.RefreshPropertyBinding("PowerSoul1"); LoadoutSouls.RefreshPropertyBinding("PowerSoul2"); HasChanges = true; }
private void AddSoul(SoulType soulType) { ActiveSouls.Add(soulType); var soul = Soul.New(soulType, LoadoutSouls); soul.ActivateUniqueEffect(); LoadoutSouls.DeregisterChild(soul); }
void RemoveSoul(SoulType soulType) { ActiveSouls.Remove(soulType); var soul = Soul.New(soulType, LoadoutSouls); soul.DeactivateUniqueEffect(); LoadoutSouls.DeregisterChild(soul); }
public void SetSoulReference(BaseSoul soul, bool overrideType = true) { this.soulReference = soul; if (overrideType) { this.soulType = this.soulReference?.soulType ?? SoulType.Red; } }
public SoulPickup(SoulType type, World world, float x, float y) : base(new RXRect(0, -7, 7, 12), world) { this.SetPosition(x, y - 3); Go.to(this, 2.0f, new TweenConfig().floatProp("y", 6, true).setEaseType(EaseType.QuadInOut).setIterations(-1, LoopType.PingPong)); this.type = type; sprite = new FSprite(type.ToString().ToLower() + "Soul"); this.AddChild(sprite); }
public SoulIndexUISoulSlot(BaseSoul soulReference = null) { this.soulReference = soulReference; this.soulType = this.soulReference?.soulType ?? SoulType.Red; this.Height.Pixels = 26; this.soulTexture = GetTexture("MysticHunter/Souls/Items/BasicSoulItem"); }
public void ToggleSoul(SoulType soul) { if (DiscoveredSouls.Any(s => s == soul)) { DiscoveredSouls.Remove(soul); HasChanges = true; } else { DiscoveredSouls.Add(soul); HasChanges = true; } }
public void OnSoulCollected(SoulType soul) { for (int i = 0; i < currSouls.Count; i++) { if (currSouls[i] == soul) { souls[i].DOColor(Color.red, 0.5f); souls[i].rectTransform.DOScale(Vector3.one * 1.5f, 0.5f); StartCoroutine(ReturnSoulIcon(souls[i])); } } List <SoulType> collected = currSouls.FindAll(x => x.isCollected == true); if (currSouls.Count == collected.Count) //play room clear animation after collect all souls in a room. { FadeInPanel(roomClearPanel); _CAMERA.RoomClear(); } }
public static Soul New(SoulType type, VLoadoutSouls collection) { if (type == SoulType.None) { return(new EmptySoul()); } var soulName = type.AsString(EnumFormat.Name) + "Soul"; var soulType = System.Type.GetType($"VBusiness.Souls.{soulName}"); if (soulType == null) { ErrorReporter.ReportDebug($"Please create a class named VBusiness.Souls.{soulName}"); return(new EmptySoul()); } var soul = (Soul)Activator.CreateInstance(soulType, collection); return(soul); }
public static string GetDescription(this SoulType type) { return(type.AsString(EnumFormat.Description, EnumFormat.Name)); }
public bool GetBindingVisibility(SoulType soul) { return(soul != SoulType.None); }
public bool GetBindingValue(SoulType soul) { return(DiscoveredSouls.Any(s => s == soul)); }
public virtual bool GetBindingValue(SoulType soul) { return(false); }
public virtual bool GetBindingVisibility(SoulType soul) { return(false); }
public virtual void ToggleSoul(SoulType soul) { }
public override bool GetBindingVisibility(SoulType soul) { return(SoulCollection.GetBindingValue(soul)); }
public override bool GetBindingValue(SoulType soul) { return(ActiveSouls.Contains(soul)); }
public void TestEnumHelper(string description, SoulType expected) { Assert.That(EnumHelper.GetEnumFromDescription <SoulType>(description), Is.EqualTo(expected)); }
private void SetSoulColor(int colour) { soulKind = (SoulType)colour; mesh.material = souls[Mathf.Min(souls.Count, colour)]; }