init
This commit is contained in:
commit
b99855351d
434 changed files with 50357 additions and 0 deletions
50
addons/inkgd/runtime/extra/state_element.gd
Normal file
50
addons/inkgd/runtime/extra/state_element.gd
Normal file
|
@ -0,0 +1,50 @@
|
|||
# warning-ignore-all:shadowed_variable
|
||||
# warning-ignore-all:unused_class_variable
|
||||
# ############################################################################ #
|
||||
# Copyright © 2015-2021 inkle Ltd.
|
||||
# Copyright © 2019-2022 Frédéric Maquin <fred@ephread.com>
|
||||
# All Rights Reserved
|
||||
#
|
||||
# This file is part of inkgd.
|
||||
# inkgd is licensed under the terms of the MIT license.
|
||||
# ############################################################################ #
|
||||
|
||||
# ############################################################################ #
|
||||
# !! VALUE TYPE
|
||||
# ############################################################################ #
|
||||
|
||||
# This element is only used during JSON parsing and is never duplicated / passed
|
||||
# around so it doesn't need to be either immutable or have a 'duplicate' method.
|
||||
|
||||
class_name InkStateElement
|
||||
|
||||
# ############################################################################ #
|
||||
|
||||
enum State {
|
||||
NONE,
|
||||
OBJECT,
|
||||
ARRAY,
|
||||
PROPERTY,
|
||||
PROPERTY_NAME,
|
||||
STRING,
|
||||
}
|
||||
|
||||
# ############################################################################ #
|
||||
|
||||
var type: int = State.NONE # State
|
||||
var child_count: int = 0
|
||||
|
||||
# ############################################################################ #
|
||||
|
||||
func _init(type: int):
|
||||
self.type = type
|
||||
|
||||
# ############################################################################ #
|
||||
# GDScript extra methods
|
||||
# ############################################################################ #
|
||||
|
||||
func is_ink_class(type) -> bool:
|
||||
return type == "StateElement"
|
||||
|
||||
func get_ink_class() -> String:
|
||||
return "StateElement"
|
Loading…
Add table
Add a link
Reference in a new issue