C# Class Terraria.GameContent.PortalHelper

Show file Open project: EmuDevs/EDTerraria Class Usage Examples

Public Methods

Method Description
GetPortalColor ( int colorIndex ) : Color
GetPortalColor ( int player, int portal ) : Color
SupportedTilesAreFine ( Vector2 portalCenter, float portalAngle ) : bool
SyncPortalSections ( Vector2 portalPosition, int fluff ) : void
SyncPortalsOnPlayerJoin ( int plr, int fluff, List dontInclude, List &portals, List &portalCenters ) : void
TryGoingThroughPortals ( Entity ent ) : void
TryPlacingPortal ( Projectile theBolt, Vector2 velocity, Vector2 theCrashVelocity ) : int
UpdatePortalPoints ( ) : void

Private Methods

Method Description
AddPortal ( Vector2 position, float angle, int form, int direction ) : int
BlockPortals ( Tile t ) : bool
FindCollision ( Vector2 startPosition, Vector2 stopPosition ) : Vector2
FindValidLine ( Point position, int xOffset, int yOffset, Point &bestPosition ) : bool
GetPortalEdges ( Vector2 position, float angle, Vector2 &start, Vector2 &end ) : void
GetPortalOutingPoint ( Vector2 objectSize, Vector2 portalPosition, float portalAngle, int &bonusX, int &bonusY ) : Vector2
IsValidLine ( Point position, int xOffset, int yOffset ) : bool
PortalHelper ( ) : Microsoft.Xna.Framework
RemoveIntersectingPortals ( Vector2 position, float angle ) : void
RemoveMyOldPortal ( int form ) : void
SupportedHalfbrick ( int x, int y ) : bool
SupportedNormal ( int x, int y ) : bool
SupportedSlope ( int x, int y, int slope ) : bool

Method Details

GetPortalColor() public static method

public static GetPortalColor ( int colorIndex ) : Color
colorIndex int
return Color

GetPortalColor() public static method

public static GetPortalColor ( int player, int portal ) : Color
player int
portal int
return Color

SupportedTilesAreFine() public static method

public static SupportedTilesAreFine ( Vector2 portalCenter, float portalAngle ) : bool
portalCenter Vector2
portalAngle float
return bool

SyncPortalSections() public static method

public static SyncPortalSections ( Vector2 portalPosition, int fluff ) : void
portalPosition Vector2
fluff int
return void

SyncPortalsOnPlayerJoin() public static method

public static SyncPortalsOnPlayerJoin ( int plr, int fluff, List dontInclude, List &portals, List &portalCenters ) : void
plr int
fluff int
dontInclude List
portals List
portalCenters List
return void

TryGoingThroughPortals() public static method

public static TryGoingThroughPortals ( Entity ent ) : void
ent Entity
return void

TryPlacingPortal() public static method

public static TryPlacingPortal ( Projectile theBolt, Vector2 velocity, Vector2 theCrashVelocity ) : int
theBolt Terraria.Projectile
velocity Vector2
theCrashVelocity Vector2
return int

UpdatePortalPoints() public static method

public static UpdatePortalPoints ( ) : void
return void