mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -59,6 +59,7 @@ void GestionJeu::create_scene()
|
||||
add_child(gPlayer);
|
||||
add_child(gTerrain);
|
||||
gMobs->AjoutMobC2C(10, 20, 5, 0, 1, 25);
|
||||
|
||||
for (KinematicBody2D* m : gMobs->mobs)
|
||||
{
|
||||
auto mob = (MobsCorpACorpIA*) m;
|
||||
@ -72,6 +73,7 @@ void GestionJeu::setup_scene()
|
||||
{
|
||||
gPlayer->setPosition(15, 150);
|
||||
gTerrain->GenerationCarte();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,6 +6,14 @@
|
||||
|
||||
MobsCorpACorpIA::MobsCorpACorpIA()
|
||||
{
|
||||
sprite_MobsCorpACorp_ptr = Sprite::_new();
|
||||
collision_MobsCorpACorp_ptr = CollisionShape2D::_new();
|
||||
texture_MobsCorpACorp_ptr.instance();
|
||||
texture_MobsCorpACorp_ptr->_new();
|
||||
shape_MobsCorpACorp_ptr.instance();
|
||||
shape_MobsCorpACorp_ptr->_new();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MobsCorpACorpIA::_register_methods()
|
||||
@ -20,31 +28,25 @@ void MobsCorpACorpIA::_register_methods()
|
||||
|
||||
void MobsCorpACorpIA::_process(float delta)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MobsCorpACorpIA::_init()
|
||||
{
|
||||
Godot::print("init Mobs");
|
||||
createMobsCorpACorp();
|
||||
|
||||
sprite_MobsCorpACorp_ptr = Sprite::_new();
|
||||
collision_MobsCorpACorp_ptr = CollisionShape2D::_new();
|
||||
texture_MobsCorpACorp_ptr.instance();
|
||||
texture_MobsCorpACorp_ptr->_new();
|
||||
shape_MobsCorpACorp_ptr.instance();
|
||||
shape_MobsCorpACorp_ptr->_new();
|
||||
}
|
||||
|
||||
void MobsCorpACorpIA::createMobsCorpACorp()
|
||||
{
|
||||
add_child(sprite_MobsCorpACorp_ptr);
|
||||
add_child(collision_MobsCorpACorp_ptr);
|
||||
Godot::print("Creation mobs");
|
||||
|
||||
}
|
||||
void MobsCorpACorpIA::_ready()
|
||||
{
|
||||
setupMobsCorpACorp();
|
||||
|
||||
}
|
||||
|
||||
void MobsCorpACorpIA::setupMobsCorpACorp()
|
||||
@ -64,19 +66,19 @@ void MobsCorpACorpIA::setupMobsCorpACorp()
|
||||
set_transform(t);
|
||||
|
||||
//Setup du shape
|
||||
//Godot::print("SetUp de Shape");
|
||||
Godot::print("SetUp de Shape Mobs");
|
||||
shape_MobsCorpACorp_ptr.ptr()->_new();
|
||||
|
||||
//Chargement de la texture
|
||||
//Godot::print("SetUp de Texture");
|
||||
texture_MobsCorpACorp_ptr = ResourceLoader::get_singleton()->load("res://Character/Fire Elemental Sprite Sheet/fireelemntal00.png");
|
||||
Godot::print("SetUp de Texture Mobs");
|
||||
texture_MobsCorpACorp_ptr = ResourceLoader::get_singleton()->load("res://Character/Fire Elemental Sprite Sheet/fireelemental00.png");
|
||||
|
||||
//setup du sprite
|
||||
//Godot::print("SetUp de Sprite");
|
||||
Godot::print("SetUp de Sprite Mobs");
|
||||
sprite_MobsCorpACorp_ptr->set_texture(texture_MobsCorpACorp_ptr);
|
||||
|
||||
//setup du collision Shape
|
||||
//Godot::print("SetUp de CollisionShape");
|
||||
Godot::print("SetUp de CollisionShape Mobs");
|
||||
collision_MobsCorpACorp_ptr->set_shape(shape_MobsCorpACorp_ptr);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ Ce projet est une __bibliothéque C++__ qui sera ensuite intérprété par GODOT
|
||||
- La copier dans le repertoire `DungeonAndDeamon --> .export`
|
||||
- Execueter le fichier `dugeonanddemon.exe`
|
||||
|
||||
\* Le projet ne contient pas encore de `MakeFile`, il n'est a ce titre il n'est compilable que via VisualStudio.
|
||||
\* Le projet ne contient pas encore de `MakeFile`, a ce titre il n'est compilable que via VisualStudio.
|
||||
## Nos Ressources
|
||||
### Godot
|
||||
#### Pourquoi ?
|
||||
|
Reference in New Issue
Block a user