Definition at line 79659 of file Main.cs.
79660 {
79661
79662
79663
79664
79665
79666
79667
79668
79669
79670
79671
79672
79673
79674
79675
79676
79677
79678
79679
79680
79681
79682
79683
79684
79685
79686
79687
79688
79689
79690
79691
79692
79693
79694
79695
79696
79697
79698
79699
79700
79701
79702
79703
79704
79705
79706
79707
79711 {
79712 num = Utils.Clamp(
num, 0, 8);
79713 }
79716 int num7 = (int)(
time / 54000.0 * (
double)(sceneArea.totalWidth + (float)(value.Width * 2))) - value.Width;
79719 float rotation = (float)(
time / 54000.0) * 2
f - 7.3f;
79720 int num10 = (int)(
time / 32400.0 * (
double)(sceneArea.totalWidth + (float)(
value2.Width * 2))) -
value2.Width;
79723 float num13 = (float)(
time / 32400.0) * 2
f - 7.3f;
79725 {
79727 if (
time < 27000.0)
79728 {
79731 }
79732 else
79733 {
79736 }
79738 }
79739 else
79740 {
79742 if (
time < 16200.0)
79743 {
79746 }
79747 else
79748 {
79751 }
79753 }
79757 {
79759 {
79761 if (
rand.Next(60) == 0)
79762 {
79763 for (
int i = 0; i <
numStars; i++)
79764 {
79765 if (
star[i].hidden)
79766 {
79767 Star.SpawnStars(i);
79768 }
79769 }
79770 }
79772 {
79775 }
79776 }
79777 else
79778 {
79780 }
79781 }
79782 else
79783 {
79785 }
79787 {
79789 {
79790 return;
79791 }
79796 {
79798 }
79799 Color color = default(Color);
79801 Color
color2 =
default(Color);
79805 {
79808 }
79810 {
79813 }
79815 {
79817 }
79818 Vector2 origin = value.Size() / 2
f;
79820 spriteBatch.Draw(value, position, (Rectangle?)
null, color, rotation, origin,
num9, (SpriteEffects)0, 0
f);
79821 spriteBatch.Draw(value, position, (Rectangle?)
null,
color2, rotation, origin,
num9, (SpriteEffects)0, 0
f);
79822 }
79824 {
79827 {
79829 }
79833 {
79834 spriteBatch.Draw(
TextureAssets.
SmileyMoon.Value,
position2, (Rectangle?)
new Rectangle(0, 0,
TextureAssets.
SmileyMoon.Width(),
TextureAssets.
SmileyMoon.Height()),
moonColor,
num13 / 2
f + (
float)
Math.PI,
new Vector2((
float)(
TextureAssets.
SmileyMoon.Width() / 2), (
float)(
TextureAssets.
SmileyMoon.Width() / 2)),
num12, (SpriteEffects)0, 0
f);
79835 }
79837 {
79838 spriteBatch.Draw(
TextureAssets.
PumpkinMoon.Value,
position2, (Rectangle?)
new Rectangle(0,
TextureAssets.
PumpkinMoon.Width() *
moonPhase,
TextureAssets.
PumpkinMoon.Width(),
TextureAssets.
PumpkinMoon.Width()),
moonColor,
num13,
new Vector2((
float)(
TextureAssets.
PumpkinMoon.Width() / 2), (
float)(
TextureAssets.
PumpkinMoon.Width() / 2)),
num12, (SpriteEffects)0, 0
f);
79839 }
79841 {
79842 spriteBatch.Draw(
TextureAssets.
SnowMoon.Value,
position2, (Rectangle?)
new Rectangle(0,
TextureAssets.
SnowMoon.Width() *
moonPhase,
TextureAssets.
SnowMoon.Width(),
TextureAssets.
SnowMoon.Width()),
moonColor,
num13,
new Vector2((
float)(
TextureAssets.
SnowMoon.Width() / 2), (
float)(
TextureAssets.
SnowMoon.Width() / 2)),
num12, (SpriteEffects)0, 0
f);
79843 }
79845 {
79846 spriteBatch.Draw(
value2,
position2, (Rectangle?)
new Rectangle(0, 0,
value2.Width,
value2.Width),
moonColor,
num13,
new Vector2((
float)(
value2.Width / 2)),
num12, (SpriteEffects)0, 0
f);
79847 }
79848 else
79849 {
79850 spriteBatch.Draw(
TextureAssets.
Moon[
num].Value,
position2, (Rectangle?)
new Rectangle(0,
TextureAssets.
Moon[
num].Width() *
moonPhase,
TextureAssets.
Moon[
num].Width(),
TextureAssets.
Moon[
num].Width()),
moonColor,
num13,
new Vector2((
float)(
TextureAssets.
Moon[
num].Width() / 2), (
float)(
TextureAssets.
Moon[
num].Width() / 2)),
num12, (SpriteEffects)0, 0
f);
79851 }
79852 }
79854 ((Rectangle)(
ref value3)).Offset((
int)
sceneArea.SceneLocalScreenPositionOffset.X, (int)
sceneArea.SceneLocalScreenPositionOffset.Y);
79855 Rectangle
rectangle =
default(Rectangle);
79860 {
79861 return;
79862 }
79864 {
79866 }
79868 {
79870 {
79871 return;
79872 }
79874 {
79877 if (
time > 53990.0)
79878 {
79880 }
79881 }
79882 else
79883 {
79886 if (
time > 32390.0)
79887 {
79889 }
79890 }
79892 {
79894 }
79896 }
79897 else
79898 {
79900 }
79901 }
static Asset< Texture2D > Sun3
static Asset< Texture2D > SmileyMoon
static Asset< Texture2D > Sun
static Asset< Texture2D > Sun2
static Asset< Texture2D > PumpkinMoon
static Asset< Texture2D > SnowMoon
static Asset< Texture2D >[] Moon
static double time
The time that has passed since it last became day/night. Increased by F:Terraria....
static SpriteBatch spriteBatch
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
static int netMode
Denotes the current network mode: 0 for single player client, 1 for multiplayer client,...
static bool alreadyGrabbingSunOrMoon
static UnifiedRandom rand
static float ForcedMinimumZoom
References Terraria.Main.alreadyGrabbingSunOrMoon, Terraria.Main.atmo, Terraria.Main.cloudAlpha, Terraria.Graphics.Light.Color, Terraria.Main.dayTime, Terraria.WorldGen.drunkWorldGen, Terraria.Main.eclipse, Terraria.Main.ForcedMinimumZoom, Terraria.Main.gameMenu, Terraria.WorldGen.generatingWorld, Terraria.Main.hasFocus, Terraria.GameContent.TextureAssets.Moon, Terraria.Main.moonModY, Terraria.Main.moonPhase, Terraria.Main.moonType, Terraria.Main.mouseLeft, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Main.numStars, Terraria.Main.player, Terraria.GameContent.TextureAssets.PumpkinMoon, Terraria.Main.pumpkinMoon, Terraria.Main.rand, Terraria.Main.remixWorld, Terraria.WorldGen.remixWorldGen, Terraria.Main.screenWidth, Terraria.GameContent.TextureAssets.SmileyMoon, Terraria.GameContent.TextureAssets.SnowMoon, Terraria.Main.snowMoon, Terraria.Star.SpawnStars(), Terraria.Main.spriteBatch, Terraria.Main.star, Terraria.Main.starGame, Terraria.Main.starsHit, Terraria.GameContent.TextureAssets.Sun, Terraria.GameContent.TextureAssets.Sun2, Terraria.GameContent.TextureAssets.Sun3, Terraria.Main.sunModY, and Terraria.Main.time.
Referenced by Terraria.Main.DoDraw(), and Terraria.Main.DrawCapture().