Skip to content

Connection Point

GeoPlayerRu edited this page Apr 13, 2021 · 5 revisions

General

Variables

Value_Bool just a bool variable.
Value_Color just a color variable.
Value_Float just a float variable.
Value_String just a string variable.
Value_Vector2 just a 2 Dimentional Vector variable.

Action

OnValueChanged - Action. Works when variable changes.

Functions

SetValue(object _value)

This is used for setting value of connection point.
_value is anything you want, but I recomend you to keep it within ConnectionDataType.

DisconnectAll()

Just disconects any connection from connection point's HUD

Connect(int ConnectionID)

I think this is for connection between connections (by the way, this returns bool)

GetConnection(ConnectionPoint point)

Returns ConnectionData from connections

Constains(CollisionPoint point)

Idk

HUD

Variables (all variables are readOnly)

Render - SpriteRenderer of connectionPoint.
Collider - CircleCollider of connectionPoint.
Point - connectionpoint itself.
ActiveSelf - Idk

Functions

HUD(SpriteRenderer render, CircleCollider2D collider, ConnectionPoint point)

Sets all variables and sets active hud. (Constructor)

SetActive(bool _bool)

Activates or deactivates connectionPoint's HUD

Update()

Updates state of ConnectionPoin HUD

UpdateSize()

Idk

GlobalSetActive(bool _bool)

Activates or deactivates all connectionPoints.

ConnectionData (Under Construction)

Variables (ReadOnly)

Point_1
IdPoint_1
Point_2
Render
MaxDistance

Functions

ConnectionData(ConnectionPoint point_1, ConnectionPoint point_2, LineRenderer render)

Class constructor.

Disconnect()

Clone this wiki locally