var enemyUnits = from unit in battleUnits where unit.type == "enemy" select unit;foreach (BattleUnit enemy in enemyUnits) { // ...}
Base64 has nothing to do with x86/x64 though, it simply means it encodes the binary data (normally base-256) as base-64 numbers, which can be mapped easily to only ASCII characters.
I don't know if you have any exposure to LINQ, but it's basically awesome. You can do stuff like this:Code: (csharp) [Select]var enemyUnits = from unit in battleUnits where unit.type == "enemy" select unit;foreach (BattleUnit enemy in enemyUnits) { // ...}
(loop for unit in battle-units when (eql (unit-type unit) :enemy) do (do-stuff-with unit))
Quote from: Lord English on May 03, 2013, 11:01:53 pmI don't know if you have any exposure to LINQ, but it's basically awesome. You can do stuff like this:Code: (csharp) [Select]var enemyUnits = from unit in battleUnits where unit.type == "enemy" select unit;foreach (BattleUnit enemy in enemyUnits) { // ...}The first thing I noticed is the similarity with Common Lisp:Code: (lisp) [Select](loop for unit in battle-units when (eql (unit-type unit) :enemy) do (do-stuff-with unit))Cool.I'm glad C# programmers get something like this. Why Microsoft didn't settle for filter/map/reduce methods, I'll probably never know. Haskell, ML, Common Lisp, Ruby, Python, Perl, JavaScript, Erlang, and probably a lot of others have had this sort of thing for a while, just under the admittedly somewhat intimidating name of higher-order functions.
var enemyUnits = $(".battleUnits[type='enemy']").each(function(e,i){ // ...});
I see what it is, you're trying to manually search the "sounds" and "music" directories (the latter of which doesn't exist). That's why I just had it search the whole project recursively, this way it picks up files whereever they happen to be. The Sphere engine itself doesn't really care where you put stuff, so I figured the editor and plugins shouldn't either in most cases.