mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-02 22:35:55 +01:00
Fix typo, and init variable to 0.
This commit is contained in:
parent
22afd8f1c8
commit
2aa3fa0468
@ -621,7 +621,7 @@ void PropInstanceMerger::_prop_preprocess(Transform transform, const Ref<PropDat
|
|||||||
|
|
||||||
tws->set_extents(Vector3(hew, heh, 0.01));
|
tws->set_extents(Vector3(hew, heh, 0.01));
|
||||||
|
|
||||||
Transform et = e->get_transform() * Transform(Basis(), Vector3(0, 0, twd->get_colldier_z_offset()));
|
Transform et = e->get_transform() * Transform(Basis(), Vector3(0, 0, twd->get_collider_z_offset()));
|
||||||
Transform tt = transform * et;
|
Transform tt = transform * et;
|
||||||
//tt.origin += Vector3(hew, heh, 0);
|
//tt.origin += Vector3(hew, heh, 0);
|
||||||
tt.translate(hew, heh, 0);
|
tt.translate(hew, heh, 0);
|
||||||
|
@ -61,11 +61,11 @@ void TiledWallData::set_collider_type(const TiledWallData::TiledWallColliderType
|
|||||||
emit_changed();
|
emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
float TiledWallData::get_colldier_z_offset() {
|
float TiledWallData::get_collider_z_offset() {
|
||||||
return _colldier_z_offset;
|
return _collider_z_offset;
|
||||||
}
|
}
|
||||||
void TiledWallData::set_colldier_z_offset(const float val) {
|
void TiledWallData::set_collider_z_offset(const float val) {
|
||||||
_colldier_z_offset = val;
|
_collider_z_offset = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TiledWallData::add_tile(const Ref<Texture> &texture, const float y_size, const float z_offset, const int texture_scale) {
|
void TiledWallData::add_tile(const Ref<Texture> &texture, const float y_size, const float z_offset, const int texture_scale) {
|
||||||
@ -355,6 +355,7 @@ TiledWallData::TiledWallData() {
|
|||||||
_tiling_type = TILED_WALL_TILING_TYPE_NONE;
|
_tiling_type = TILED_WALL_TILING_TYPE_NONE;
|
||||||
_collider_type = TILED_WALL_COLLIDER_TYPE_PLANE;
|
_collider_type = TILED_WALL_COLLIDER_TYPE_PLANE;
|
||||||
_flavour_chance = 0.15;
|
_flavour_chance = 0.15;
|
||||||
|
_collider_z_offset = 0;
|
||||||
}
|
}
|
||||||
TiledWallData::~TiledWallData() {
|
TiledWallData::~TiledWallData() {
|
||||||
_tiles.clear();
|
_tiles.clear();
|
||||||
@ -507,9 +508,9 @@ void TiledWallData::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_collider_type", "texture"), &TiledWallData::set_collider_type);
|
ClassDB::bind_method(D_METHOD("set_collider_type", "texture"), &TiledWallData::set_collider_type);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_type", PROPERTY_HINT_ENUM, TiledWallData::BINDING_STRING_TILED_WALL_COLLIDER_TYPE), "set_collider_type", "get_collider_type");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_type", PROPERTY_HINT_ENUM, TiledWallData::BINDING_STRING_TILED_WALL_COLLIDER_TYPE), "set_collider_type", "get_collider_type");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_colldier_z_offset"), &TiledWallData::get_colldier_z_offset);
|
ClassDB::bind_method(D_METHOD("get_collider_z_offset"), &TiledWallData::get_collider_z_offset);
|
||||||
ClassDB::bind_method(D_METHOD("set_colldier_z_offset", "val"), &TiledWallData::set_colldier_z_offset);
|
ClassDB::bind_method(D_METHOD("set_collider_z_offset", "val"), &TiledWallData::set_collider_z_offset);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "colldier_z_offset"), "set_colldier_z_offset", "get_colldier_z_offset");
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "collider_z_offset"), "set_collider_z_offset", "get_collider_z_offset");
|
||||||
|
|
||||||
//textures
|
//textures
|
||||||
ClassDB::bind_method(D_METHOD("add_tile", "texture", "y_size", "z_offset", "texture_scale"), &TiledWallData::add_tile, 1, 0, 1);
|
ClassDB::bind_method(D_METHOD("add_tile", "texture", "y_size", "z_offset", "texture_scale"), &TiledWallData::add_tile, 1, 0, 1);
|
||||||
|
@ -89,8 +89,8 @@ public:
|
|||||||
TiledWallColliderType get_collider_type() const;
|
TiledWallColliderType get_collider_type() const;
|
||||||
void set_collider_type(const TiledWallColliderType value);
|
void set_collider_type(const TiledWallColliderType value);
|
||||||
|
|
||||||
float get_colldier_z_offset();
|
float get_collider_z_offset();
|
||||||
void set_colldier_z_offset(const float val);
|
void set_collider_z_offset(const float val);
|
||||||
|
|
||||||
//textures
|
//textures
|
||||||
void add_tile(const Ref<Texture> &texture, const float y_size = 1, const float z_offset = 0, const int texture_scale = 1);
|
void add_tile(const Ref<Texture> &texture, const float y_size = 1, const float z_offset = 0, const int texture_scale = 1);
|
||||||
@ -169,7 +169,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
TiledWallTilingType _tiling_type;
|
TiledWallTilingType _tiling_type;
|
||||||
TiledWallColliderType _collider_type;
|
TiledWallColliderType _collider_type;
|
||||||
float _colldier_z_offset;
|
float _collider_z_offset;
|
||||||
|
|
||||||
Vector<TextureEntry> _tiles;
|
Vector<TextureEntry> _tiles;
|
||||||
Vector<TextureEntry> _flavour_tiles;
|
Vector<TextureEntry> _flavour_tiles;
|
||||||
|
Loading…
Reference in New Issue
Block a user