setDefinedProperty() 공개 메소드

public setDefinedProperty ( string name, object val ) : void
name string
val object
리턴 void
    public void set_MP(KBEngine.Entity entity, object v)
    {
        object vv = entity.getDefinedProperty("MP_Max");

        if (entity.renderObj != null)
        {
            object oldvv = entity.getDefinedProperty("old_MP");
            if (oldvv != null)
            {
                Int32 diff = (Int32)vv - (Int32)oldvv;

                if (diff > 0)
                {
                    ((SceneEntityObject)entity.renderObj).addMP(diff);
                }

                entity.setDefinedProperty("old_MP", vv);
            }
            else
            {
                entity.addDefinedProperty("old_MP", vv);
            }
        }

        if (entity.isPlayer())
        {
            game_ui_autopos.updatePlayerBar_MP(v, vv);
        }
        else
        {
            game_ui_autopos.updateTargetBar_MP(v, vv);
        }
    }