forked from OtherworldBob/ManiacEditor
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
137 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using RSDKv5; | ||
using RSDKv5; | ||
using SystemColors = System.Drawing.Color; | ||
using System.Linq; | ||
|
||
|
41 changes: 41 additions & 0 deletions
41
ManiacEditor/Entity Renders/Normal Renders/Bounded/ConveyorBelt.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using RSDKv5; | ||
using SystemColors = System.Drawing.Color; | ||
using System.Linq; | ||
|
||
namespace ManiacEditor.Entity_Renders | ||
{ | ||
public class ConveyorBelt : EntityRenderer | ||
{ | ||
|
||
public override void Draw(Structures.EntityRenderProp Properties) | ||
{ | ||
DevicePanel d = Properties.Graphics; | ||
Classes.Scene.EditorEntity e = Properties.EditorObject; | ||
int x = Properties.DrawX; | ||
int y = Properties.DrawY; | ||
int Transparency = Properties.Transparency; | ||
|
||
//var Animation = Methods.Drawing.ObjectDrawing.LoadAnimation(Properties.Graphics, "Editor/EditorIcons.bin"); | ||
//DrawTexturePivotNormal(d, Animation, 0, 5, x, y, Transparency); | ||
|
||
var widthPixels = (int)(e.attributesMap["size"].ValueVector2.X.High); | ||
var heightPixels = (int)(e.attributesMap["size"].ValueVector2.Y.High); | ||
var width = (int)widthPixels / 16; | ||
var height = (int)heightPixels / 16; | ||
|
||
DrawBounds(d, x, y, widthPixels, heightPixels, Transparency, SystemColors.White, SystemColors.Transparent); | ||
} | ||
|
||
public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency) | ||
{ | ||
var widthPixels = (int)(entity.attributesMap["size"].ValueVector2.X.High); | ||
var heightPixels = (int)(entity.attributesMap["size"].ValueVector2.Y.High); | ||
return d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels, heightPixels); | ||
} | ||
|
||
public override string GetObjectName() | ||
{ | ||
return "ConveyorBelt"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters