mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 12:16:14 +01:00
Modul Oberklasse geadded
This commit is contained in:
42
Module.gd
Normal file
42
Module.gd
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
#-----------Parameters----------------'
|
||||||
|
var currentStashValue = 0 : set = _set_currentStashValue, get = _get_currentStashValue
|
||||||
|
|
||||||
|
var maxStashValue = 0 : set = _set_maxStashValue, get = _get_maxStashValue
|
||||||
|
|
||||||
|
var currentState = null : set = _set_state, get = _get_state
|
||||||
|
|
||||||
|
var level = 0 : set = _set_level, get = _get_level
|
||||||
|
|
||||||
|
|
||||||
|
enum MODULE_TYPE {CANNON, STEERING, ENGINE, STORAGE}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#------------Methods-------------#
|
||||||
|
|
||||||
|
|
||||||
|
func interact():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-----------Setter and Getter---------------#
|
||||||
|
func _set_currentStashValue(newValue):
|
||||||
|
currentStashValue = newValue
|
||||||
|
func _get_currentStashValue():
|
||||||
|
return currentStashValue
|
||||||
|
func _set_maxStashValue(newValue):
|
||||||
|
currentStashValue = newValue
|
||||||
|
func _get_maxStashValue():
|
||||||
|
return currentStashValue
|
||||||
|
func _set_level(newValue):
|
||||||
|
level = newValue
|
||||||
|
func _get_level():
|
||||||
|
return level
|
||||||
|
func _set_state(newValue):
|
||||||
|
currentState = newValue
|
||||||
|
func _get_state():
|
||||||
|
return currentState
|
||||||
6
Module.tscn
Normal file
6
Module.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://b87b68ghm4dkk"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://Module.gd" id="1_42v8k"]
|
||||||
|
|
||||||
|
[node name="Node" type="Node"]
|
||||||
|
script = ExtResource("1_42v8k")
|
||||||
Reference in New Issue
Block a user