#ifndef EFFECTENTRY_H_
#define EFFECTENTRY_H_
#include "jp/ggaf/lib/actor/DefaultMeshSetActor.h"

namespace VioletVreath {

/**
 * 搊応僄僼僃僋僩婎掙 .
 * @version 1.00
 * @since 2013/06/28
 * @author Masatoshi Tsuge
 */
class EffectEntry : public GgafLib::DefaultMeshSetActor {

public:
    enum {
        PROG_INIT ,
        PROG_IN   ,
        PROG_STAY ,
        PROG_OUT  ,
        PROG_BANPEI,
    };

    /** [r]僄僼僃僋僩敪惗乣嵟戝偺戝偒偝傑偱奼戝丄傑偱偺僼儗乕儉悢 */
    frame scale_in_frames_;
    /** [r]僄僼僃僋僩帩懕僼儗乕儉悢 */
    frame duration_frames_;
    /** [r]僄僼僃僋僩帩懕姰椆乣徚柵傑偱偺僼儗乕儉悢 */
    frame scale_out_frames_;
    /** [r]僄僼僃僋僩懳徾偺傾僋僞乕 */
    GgafDxCore::GgafDxGeometricActor* pTarget_;
    /** [r]奼戝弅彫巟墖僆僽僕僃僋僩 */
    GgafDxCore::GgafDxScaler* pScaler_;

public:
    /**
     * 僐儞僗僩儔僋僞 .
     * @param prm_name 幆暿柤
     * @param prm_model 儌僨儖ID
     */
    EffectEntry(const char* prm_name, const char* prm_model);

    virtual void onInactive() override;

    virtual void onActive() override;

    virtual void processBehavior() override;

    virtual void processJudgement() override;

    /**
     * 僄僼僃僋僩偺嵗昗傪堷悢偺傾僋僞乕偲摨偠嵗昗偵宲懕偝偣傞 .
     * @param prm_pTarget 僄僼僃僋僩偺嵗昗偵側傞傾僋僞乕
     */
    void positionFollow(GgafDxCore::GgafDxGeometricActor* prm_pTarget);

    /**
     * 僄僼僃僋僩偺敪惗丄帩懕丄徚柵偺帪娫傪愝掕丅.
     * </PRE>
     *       丵丵丵丵               仼 Top 僗働乕儖
     *      /:      :乢
     *     / :      :  乢
     *    /  :      :    乢
     *   /   :      :      乢
     *  /    :      :        乢
     * /     :      :          乢   仼 Bottom 僗働乕儖
     * ----------------------------------------------->帪娫乮僼儗乕儉乯
     * 仼嘆仺|仼嘇仺|仼劅 嘊 劅仺|
     *
     * </PRE>
     * Top 僗働乕儖,Bottom 僗働乕儖偼 pScaler_->forceRange(TOP,BOTTOM) 偱忋彂偒愝掕壜擻丅
     * @param prm_scale_in_frames 忋婰嘆偺僼儗乕儉悢 (1乣)
     * @param prm_duration_frames 忋婰嘇偺僼儗乕儉悢 (0乣)
     * @param prm_scale_out_frames 忋婰嘊偺僼儗乕儉悢 (1乣)
     */
    void config(frame prm_scale_in_frames, frame prm_duration_frames, frame prm_scale_out_frames);

    virtual ~EffectEntry();
};

}
#endif /*EFFECTENTRY_H_*/

