moon cleanup

Charles Spurrill 2010-11-24 12:28:56 -08:00
parent ad6851e49b
commit 8e90caa413
1 changed files with 16 additions and 16 deletions

View File

@ -9,7 +9,7 @@ protected func Initialize()
SetClrModulation(RGBa(255,255,255,alpha));
phase = 1;
Phase(true);
this["Parallaxity"] = [40,100];
this["Parallaxity"] = [40,40];
}
public func Phase(bool noAdvance)
@ -21,7 +21,7 @@ public func Phase(bool noAdvance)
}
if(phase == 1) SetGraphics();
if(phase>1) SetGraphics(Format("%d",LocalN("phase")-1));
if(phase > 1) SetGraphics(Format("%d",phase - 1));
if(phase == 1) SetPosition(LandscapeWidth() / 4,LandscapeHeight() / 4);
if(phase == 2) SetPosition(LandscapeWidth() / 3,LandscapeHeight() / 5);
if(phase == 3) SetPosition(LandscapeWidth() / 2,LandscapeHeight() / 6);
@ -31,10 +31,10 @@ public func Phase(bool noAdvance)
//Get phase can also be used to modify the phase... ie: QueryPhase(3) would set
//the phase of the moon to phase 3. QueryPhase() will simply return the current moon phase.
global func GetPhase(int iphase)
public func GetPhase(int iphase)
{
var moonphase=FindObject(Find_ID(Moon))->LocalN("phase");
if(iphase!=nil && iphase<6) FindObject(Find_ID(Moon))->SetPhase(iphase);
var moonphase = phase;
if(iphase != nil && iphase < 6) SetPhase(iphase);
return moonphase;
}
//ties global to local func