HPlainNode.cpp 845 Bytes
//
//  HPlainNode.cpp
//  SteveMaggieCpp
//
//  Created by Katarzyna Kalinowska-Górska on 17.05.2017.
//
//

#include <stdio.h>
#include "HPlainNode.h"


HPlainNode* HPlainNode::create()
{
    HPlainNode * node = new (std::nothrow) HPlainNode();
    if(node && node->init())
    {
        node->autorelease();
        return node;
    }
    CC_SAFE_DELETE(node);
    return nullptr;
}

void HPlainNode::loadPropertiesFromJSON(const rapidjson::Value& jsonValue, HLayoutViewInterface* scene, const std::string resFolder, const std::string altResFolder)
{
    this->setAnchorPoint(cocos2d::Point(0.5, 0.5));
    this->loadCommonPropertiesFromJSON(jsonValue);
}

void HPlainNode::prepareSize(const rapidjson::Value& jsonValue, float& width, float& height)
{
    width = this->getContentSize().width;
    height = this->getContentSize().height;
}