| View previous topic :: View next topic |
dreamora
Joined: 05 Apr 2008 Posts: 13707 Location: Zürich, Switzerland
|
Posted: Sun Dec 07, 2008 7:14 pm Post subject: |
|
|
|
There is one thing to keep in mind: Unity iPhone only supports .NET 1.1, so if you have a fully fledged Unity .Net 2.0 DLL it won't work on the iPhone version at all. _________________ Contract work: Past work, experience, technologies
Blog: UnityVersum |
|
| Back to top |
|
|
cjcurrie

Joined: 27 Nov 2008 Posts: 231 Location: Boise, United States
|
Posted: Sun Dec 21, 2008 9:09 pm Post subject: JavaScript Implementation |
|
|
|
Hi,
Maybe this is the wrong place for this, but I was wondering if there was any way to implement AngryAnt's Behave using Javascript, or if you have to use C# or Boo only for Agent Interfaces.
Basically, I don't know either C# or Boo very well I'm a JavaScripter. _________________ CJ Currie
Co-Owner, Black Storms Studios, LLC.
Check out my Unity development blog:
http://cjcurrie.net/ |
|
| Back to top |
|
|
Arges

Joined: 05 Oct 2008 Posts: 287
|
|
| Back to top |
|
|
Eric5h5
Joined: 19 Jul 2006 Posts: 10851
|
Posted: Mon Dec 22, 2008 2:37 am Post subject: |
|
|
|
| Arges wrote: | | Not sure how you'd handle the enum comparison, since Unity's quasi-Javascript doesn't seem to support them, but you might be fine when simply comparing it against the predefined values. |
| Code: | enum FileType {SceneLoad, HeightmapLoad, TextureLoad, SceneSave, HeightmapSave, SplatmapSave, ColormapSave, ObjSave}
private var fileType : FileType;
function FileWindow () {
// some stuff
if (fileType <= FileType.TextureLoad) {
// do loading stuff here
}
else {
// do saving stuff here
}
} |
That's from Fractscape, which is in Javascript, and not lacking in complexity.
--Eric |
|
| Back to top |
|
|
Arges

Joined: 05 Oct 2008 Posts: 287
|
Posted: Mon Dec 22, 2008 5:21 am Post subject: |
|
|
|
Hi Eric,
So it can use enums, thanks for the tip. I understood you couldn't declare them, is that correct? _________________ Ricardo J. Méndez
http://www.arges-systems.com/ |
|
| Back to top |
|
|
Eric5h5
Joined: 19 Jul 2006 Posts: 10851
|
Posted: Mon Dec 22, 2008 5:43 am Post subject: |
|
|
|
If by declaring them you mean something like
| Code: | | enum Foo {Blah = 2, Bar = 5, Zoinks = 11} |
then yeah, that works too. The only thing I know of that you can't declare in Javascript is multi-dimensional built-in arrays (i.e., "var foo = new float[129,129]" fails), although you can use them through type inference (like with TerrainData.GetHeights).
--Eric |
|
| Back to top |
|
|
Arges

Joined: 05 Oct 2008 Posts: 287
|
Posted: Mon Dec 22, 2008 6:25 am Post subject: |
|
|
|
| Eric5h5 wrote: | If by declaring them you mean something like
| Code: | | enum Foo {Blah = 2, Bar = 5, Zoinks = 11} |
then yeah, that works too. |
Cool, I asked on the IRC channel a couple weeks ago and got a "not supported" reply. _________________ Ricardo J. Méndez
http://www.arges-systems.com/ |
|
| Back to top |
|
|
Eric5h5
Joined: 19 Jul 2006 Posts: 10851
|
Posted: Mon Dec 22, 2008 6:33 am Post subject: |
|
|
|
Those wacky IRC people!
--Eric |
|
| Back to top |
|
|
David Montgomery-Blake

Joined: 29 Aug 2005 Posts: 82
|
Posted: Mon Dec 22, 2008 6:09 pm Post subject: |
|
|
|
Nice blog. Added it to my feed. _________________ TorquePowered.com Community Manager and all-around fan of Torque, Unity, and BlitzMax. |
|
| Back to top |
|
|