Skip to content

Commit d19684a

Browse files
committed
Fixed formatting 2
1 parent d2b07e2 commit d19684a

File tree

6 files changed

+34
-16
lines changed

6 files changed

+34
-16
lines changed

.editorconfig

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ root = true
33
[{**/Doxyfile,**/LICENSE,**/*.md,**/*.sln}]
44
generated_code = true
55
ij_formatter_enabled = false
6-
insert_final_newline = false
6+
insert_final_newline = unset
77

88
[*]
99
charset = utf-8
@@ -225,11 +225,15 @@ indent_size = 2
225225
tab_width = 2
226226

227227
[*.{json,csproj,nuspec,Config}]
228-
insert_final_newline = false
228+
insert_final_newline = unset
229+
230+
[.nuspec]
231+
max_line_length = unset
229232

230233
[*.sln]
231234
max_line_length = 400
232235
indent_style = tab
236+
insert_final_newline = unset
233237

234238
[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,cc,cginc,compute,cp,cpp,cppm,cs,cshtml,cu,cuh,cxx,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,nuspec,paml,razor,resw,resx,shader,skin,tpp,usf,ush,vb,xaml,xamlx,xoml,xsd}]
235239
indent_style = space

GREngine.Algorithms/Sort.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public static IList<T> MergeSortedLists<T>(IList<T> a, IList<T> b) where T : ICo
2222
}
2323
private static IList<T> MergeSortedLists_Large_Small<T>(IList<T> a, IList<T> b) where T : IComparable<T>
2424
{
25-
// Algorithm from: Sujith Karivelil's answer on https://stackoverflow.com/questions/37780578/merging-two-lists-which-are-already-sorted-in-c-sharp
25+
// Algorithm from: Sujith Karivelil's answer on
26+
// https://stackoverflow.com/questions/37780578/merging-two-lists-which-are-already-sorted-in-c-sharp
2627
int largeArrayCount = a.Count;
2728
int currentBIndex = 0;
2829
List<T> finalResult = new List<T>();

GREngine.Core/GREngine.Core.PebbleRenderer/PebbleRenderer.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ private void RenderNoise()
575575
setEngineShaderParams(gradientNoiseShader.shader);
576576
spriteBatch.Begin(effect: gradientNoiseShader.shader);
577577
spriteBatch.Draw(nullTexture, new Vector2(0), null, Color.White, 0, Vector2.Zero,
578-
new Vector2(renderWidth, renderHeight), SpriteEffects.None, 0);
578+
new Vector2(renderWidth, renderHeight), SpriteEffects.None, 0);
579579
spriteBatch.End();
580580
Game.GraphicsDevice.SetRenderTarget(null);//? needed?
581581
}
@@ -634,8 +634,8 @@ private void renderDebugShapes(RenderTarget2D target, Matrix viewProjection)
634634
case DebugShape.RECTANGLE:
635635
spriteBatch.DrawRectangle(
636636
new Rectangle((int)drawable.position.X, (int)drawable.position.Y,
637-
(int)(drawable.position2.X - drawable.position.X),
638-
(int)(drawable.position2.Y - drawable.position.Y)), drawable.color, 4);
637+
(int)(drawable.position2.X - drawable.position.X),
638+
(int)(drawable.position2.Y - drawable.position.Y)), drawable.color, 4);
639639
break;
640640
case DebugShape.CIRCLE:
641641
spriteBatch.DrawCircle(drawable.position, drawable.position2.X, 32, drawable.color, 4);
@@ -653,7 +653,7 @@ private void renderUI(RenderTarget2D target)
653653
{
654654
UIDrawable drawable = UIShapes.Dequeue();
655655
spriteBatch.DrawString(drawable.font, drawable.text, drawable.position, drawable.color, 0,
656-
Vector2.Zero, drawable.scale, SpriteEffects.None, 0);
656+
Vector2.Zero, drawable.scale, SpriteEffects.None, 0);
657657

658658
}
659659
spriteBatch.End();

GameDemo1/App.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ protected override void LoadContent()
5858
new Shader(Content.Load<Effect>("Graphics/puddleNormalMapped")),
5959
new Shader(Content.Load<Effect>("Graphics/puddleRoughness")));
6060
renderManager.addMaterial(puddleMat);
61-
Material playerMat = new Material(new Shader(Content.Load<Effect>("Graphics/PlayerDiffuseShader")), null, null);
62-
Material laserMat = new Material(new Shader(Content.Load<Effect>("Graphics/LaserShader")), null, null);
61+
Material playerMat = new Material(
62+
new Shader(Content.Load<Effect>("Graphics/PlayerDiffuseShader")), null, null);
63+
Material laserMat = new Material(
64+
new Shader(Content.Load<Effect>("Graphics/LaserShader")), null, null);
6365
renderManager.addMaterial(playerMat);
6466
renderManager.addMaterial(laserMat);
6567
renderManager.addPostProcess(
@@ -85,7 +87,8 @@ protected override void LoadContent()
8587

8688
protected override void Update(GameTime gameTime)
8789
{
88-
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
90+
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
91+
Keyboard.GetState().IsKeyDown(Keys.Escape))
8992
Exit();
9093

9194
base.Update(gameTime);

GameDemo1/Scripts/Enemy.cs

+15-5
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,18 @@ protected override void OnStart()
5050

5151
// PrintLn(Node.GetLocalPosition2D().ToString());
5252

53-
collider = this.Game.Services.GetService<ISceneControllerService>().InitBehaviour(this.Node, new CircleCollider(50, true)) as CircleCollider;
53+
collider = this.Game.Services.GetService<ISceneControllerService>().InitBehaviour(
54+
this.Node, new CircleCollider(50, true)) as CircleCollider;
5455
this.collider.SetStatic(true);
5556
this.collider.SetTrigger(true);
5657
this.collider.SetLayer(GameScene.enemyCollisionLayer);
57-
this.collider.SetAllowedCollisionLayers(new List<string>() { GameScene.mapFloorCollisionLayer, GameScene.enemyCollisionLayer, GameScene.mapWallCollisionLayer, GameScene.playerCollisionLayer });
58+
this.collider.SetAllowedCollisionLayers(
59+
new List<string>() {
60+
GameScene.mapFloorCollisionLayer,
61+
GameScene.enemyCollisionLayer,
62+
GameScene.mapWallCollisionLayer,
63+
GameScene.playerCollisionLayer
64+
});
5865

5966
this.collider.OnTriggerEnter += with =>
6067
{
@@ -66,7 +73,8 @@ protected override void OnStart()
6673
{
6774
Node playerNode = this.player.Node;
6875
if (playerNode != null)
69-
((CircleCollider)playerNode.GetBehaviour<CircleCollider>()).SetVelocity(Vector.SafeNormalize(this.GetPlayerDirection()) * this.hitStrength);
76+
((CircleCollider)playerNode.GetBehaviour<CircleCollider>()).SetVelocity(
77+
Vector.SafeNormalize(this.GetPlayerDirection()) * this.hitStrength);
7078
}
7179
};
7280
}
@@ -98,7 +106,8 @@ protected override void OnUpdate(GameTime gameTime)
98106
{
99107
if (this.spawner.PlayerTouchingFrame != lastValue)
100108
{
101-
this.Velocity += new Vector2(rand.NextSingle() - 0.5f, rand.NextSingle() - 0.5f) * this.walkSpeed * 10;
109+
this.Velocity += new Vector2(
110+
rand.NextSingle() - 0.5f, rand.NextSingle() - 0.5f) * this.walkSpeed * 10;
102111
}
103112
if (this.GetPlayerDirection().Length() < this.diveDistance)
104113
{
@@ -134,7 +143,8 @@ protected override void OnUpdate(GameTime gameTime)
134143

135144
this.Node.SetLocalPosition(this.Node.GetLocalPosition2D() + this.Velocity);
136145
// PrintLn((this.Node.GetLocalPosition2D() + this.velocity).ToString());
137-
//this.Game.Services.GetService<IPebbleRendererService>().drawDebug(new DebugDrawable(this.Node.GetGlobalPosition2D(), 30, this.isGrounded > 3 ? Color.Orange : Color.Aqua));
146+
//this.Game.Services.GetService<IPebbleRendererService>().drawDebug(
147+
//new DebugDrawable(this.Node.GetGlobalPosition2D(), 30, this.isGrounded > 3 ? Color.Orange : Color.Aqua));
138148

139149
lastValue = this.spawner.PlayerTouchingFrame;
140150
}

GameDemo1/Scripts/PlayerController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected override void OnStart()
102102
this.Game.Services.GetService<ISceneControllerService>().AddBehaviour(Node, laser);
103103

104104
Sprite playerSprite = new Sprite(0, new Vector2(0.2f),
105-
Game.Content.Load<Texture2D>("Graphics/PlayerDiffuse"), null, null, 6, 3);
105+
Game.Content.Load<Texture2D>("Graphics/PlayerDiffuse"), null, null, 6, 3);
106106
this.Game.Services.GetService<ISceneControllerService>().AddBehaviour(Node, playerSprite);
107107
}
108108

0 commit comments

Comments
 (0)