mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-13 03:37:31 +08:00
Small refactoring
This commit is contained in:
@@ -11,6 +11,11 @@ export default class IntegerEntity extends Entity {
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
if (options.constructor === Number || options.constructor === String) {
|
||||
options = {
|
||||
value: options
|
||||
}
|
||||
}
|
||||
super(options)
|
||||
this.value = Math.round(this.value)
|
||||
}
|
||||
|
||||
@@ -41,22 +41,6 @@ export default class PinEntity extends Entity {
|
||||
return PinEntity.attributes
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {String}
|
||||
*/
|
||||
getPinDisplayName() {
|
||||
return this.PinName
|
||||
}
|
||||
|
||||
isConnected() {
|
||||
return this.LinkedTo.length > 0
|
||||
}
|
||||
|
||||
getType() {
|
||||
return this.PinType.PinCategory ?? "object"
|
||||
}
|
||||
|
||||
isInput() {
|
||||
if (!this.bHidden && this.Direction !== "EGPD_Output") {
|
||||
return true
|
||||
@@ -68,4 +52,12 @@ export default class PinEntity extends Entity {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
isConnected() {
|
||||
return this.LinkedTo.length > 0
|
||||
}
|
||||
|
||||
getType() {
|
||||
return this.PinType.PinCategory ?? "object"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user