// Path: warcraft-game/src/main/java/com/b3dgs/warcraft/object/state/StateDead.java
// public class StateDead extends State
// {
//     /**
//      * Create the state.
//      * 
//      * @param model The model reference.
//      * @param animation The animation reference.
//      */
//     StateDead(EntityModel model, Animation animation)
//     {
//         super(model, animation);
//     }
// 
//     @Override
//     public void enter()
//     {
//         super.enter();
// 
//         model.getFeature(Layerable.class)
//              .setLayer(Integer.valueOf(Constant.LAYER_CORPSE), Integer.valueOf(Constant.LAYER_CORPSE));
//     }
// }
// 
// Path: warcraft-game/src/main/java/com/b3dgs/warcraft/object/state/StateDeadGold.java
// public final class StateDeadGold extends StateDead
// {
//     /**
//      * Create the state.
//      * 
//      * @param model The model reference.
//      * @param animation The animation reference.
//      */
//     StateDeadGold(EntityModel model, Animation animation)
//     {
//         super(model, animation);
//     }
// }
// 
// Path: warcraft-game/src/main/java/com/b3dgs/warcraft/object/state/StateDeadWood.java
// public final class StateDeadWood extends StateDead
// {
//     /**
//      * Create the state.
//      * 
//      * @param model The model reference.
//      * @param animation The animation reference.
//      */
//     StateDeadWood(EntityModel model, Animation animation)
//     {
//         super(model, animation);
//     }
// }


import com.b3dgs.lionengine.AnimState;
import com.b3dgs.lionengine.Media;
import com.b3dgs.lionengine.Medias;
import com.b3dgs.lionengine.Tick;
import com.b3dgs.lionengine.Updatable;
import com.b3dgs.lionengine.game.feature.Animatable;
import com.b3dgs.lionengine.game.feature.FeatureGet;
import com.b3dgs.lionengine.game.feature.FeatureInterface;
import com.b3dgs.lionengine.game.feature.FeatureModel;
import com.b3dgs.lionengine.game.feature.Identifiable;
import com.b3dgs.lionengine.game.feature.Recyclable;
import com.b3dgs.lionengine.game.feature.Routine;
import com.b3dgs.lionengine.game.feature.Services;
import com.b3dgs.lionengine.game.feature.Setup;
import com.b3dgs.lionengine.game.feature.Spawner;
import com.b3dgs.lionengine.game.feature.Transformable;
import com.b3dgs.lionengine.game.feature.state.StateHandler;
import com.b3dgs.lionengine.game.feature.tile.map.pathfinding.Pathfindable;
import com.b3dgs.warcraft.object.state.StateDead;
import com.b3dgs.warcraft.object.state.StateDeadGold;
import com.b3dgs.warcraft.object.state.StateDeadWood;

/*
 * Copyright (C) 2013-2022 Byron 3D Games Studio (www.b3dgs.com) Pierre-Alexandre (contact@b3dgs.com)
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 */
package com.b3dgs.warcraft.object.feature;


/**
 * Represents something that can decay.
 */
@FeatureInterface
public class Decayable extends FeatureModel implements Routine, Recyclable
{
    private static final String NODE_DECAY = "decay";
    private static final String ATT_CORPSE = "corpse";
    private static final String ATT_DELAY = "delay";

    private final Tick tick = new Tick();
    private final Updatable checkDead;
    private final Updatable checkCorpse;

    private Updatable check;

    @FeatureGet private Identifiable identifiable;
    @FeatureGet private Transformable transformable;
    @FeatureGet private Pathfindable pathfindable;
    @FeatureGet private Animatable animatable;

// Path: warcraft-game/src/main/java/com/b3dgs/warcraft/object/state/StateDead.java
// public class StateDead extends State
// {
//     /**
//      * Create the state.
//      * 
//      * @param model The model reference.
//      * @param animation The animation reference.
//      */
//     StateDead(EntityModel model, Animation animation)
//     {
//         super(model, animation);
//     }
// 
//     @Override
//     public void enter()
//     {
//         super.enter();
// 
//         model.getFeature(Layerable.class)
//              .setLayer(Integer.valueOf(Constant.LAYER_CORPSE), Integer.valueOf(Constant.LAYER_CORPSE));
//     }
// }
// 
// Path: warcraft-game/src/main/java/com/b3dgs/warcraft/object/state/StateDeadGold.java
// public final class StateDeadGold extends StateDead
// {
//     /**
//      * Create the state.
//      * 
//      * @param model The model reference.
//      * @param animation The animation reference.
//      */
//     StateDeadGold(EntityModel model, Animation animation)
//     {
//         super(model, animation);
//     }
// }
// 
// Path: warcraft-game/src/main/java/com/b3dgs/warcraft/object/state/StateDeadWood.java
// public final class StateDeadWood extends StateDead
// {
//     /**
//      * Create the state.
//      * 
//      * @param model The model reference.
//      * @param animation The animation reference.
//      */
//     StateDeadWood(EntityModel model, Animation animation)
//     {
//         super(model, animation);
//     }
// }


// Path: warcraft-game/src/main/java/com/b3dgs/warcraft/object/feature/Decayable.java
import com.b3dgs.lionengine.AnimState;
import com.b3dgs.lionengine.Media;
import com.b3dgs.lionengine.Medias;
import com.b3dgs.lionengine.Tick;
import com.b3dgs.lionengine.Updatable;
import com.b3dgs.lionengine.game.feature.Animatable;
import com.b3dgs.lionengine.game.feature.FeatureGet;
import com.b3dgs.lionengine.game.feature.FeatureInterface;
import com.b3dgs.lionengine.game.feature.FeatureModel;
import com.b3dgs.lionengine.game.feature.Identifiable;
import com.b3dgs.lionengine.game.feature.Recyclable;
import com.b3dgs.lionengine.game.feature.Routine;
import com.b3dgs.lionengine.game.feature.Services;
import com.b3dgs.lionengine.game.feature.Setup;
import com.b3dgs.lionengine.game.feature.Spawner;
import com.b3dgs.lionengine.game.feature.Transformable;
import com.b3dgs.lionengine.game.feature.state.StateHandler;
import com.b3dgs.lionengine.game.feature.tile.map.pathfinding.Pathfindable;
import com.b3dgs.warcraft.object.state.StateDead;
import com.b3dgs.warcraft.object.state.StateDeadGold;
import com.b3dgs.warcraft.object.state.StateDeadWood;

/*
 * Copyright (C) 2013-2022 Byron 3D Games Studio (www.b3dgs.com) Pierre-Alexandre (contact@b3dgs.com)
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 */
package com.b3dgs.warcraft.object.feature;


/**
 * Represents something that can decay.
 */
@FeatureInterface
public class Decayable extends FeatureModel implements Routine, Recyclable
{
    private static final String NODE_DECAY = "decay";
    private static final String ATT_CORPSE = "corpse";
    private static final String ATT_DELAY = "delay";

    private final Tick tick = new Tick();
    private final Updatable checkDead;
    private final Updatable checkCorpse;

    private Updatable check;

    @FeatureGet private Identifiable identifiable;
    @FeatureGet private Transformable transformable;
    @FeatureGet private Pathfindable pathfindable;
    @FeatureGet private Animatable animatable;

    @FeatureGet private StateHandler stateHandler;
