//
//  Tile.cpp
//  Game
//
//  Created by Darvydas on 26/01/2019.
//

#include "Game/GameScene/World/Objects/Tile.hpp"

using namespace cocos2d;

namespace Game
{
    namespace Objects
    {
        CTile *CTile::create(cocos2d::Sprite* pcWorld, std::string imageName) {
            
            CTile *sp = new CTile;
            
                        
            if (sp->initWithFile(imageName)) {
                
                sp->autorelease();
                
                sp->createVisualElements();
                
                return sp;
            }
            CC_SAFE_DELETE(sp);
            return NULL;
        }
        
        const char* CTile::getFileName()
        {
            switch (m_eType) {
                case Objects::Side :
                    return "tilewood1.png";
                    break;
                case Objects::Corner :
                    return "tilewood1.png";
                    break;
                case Objects::Center :
                    return "tilewood1.png";
                    break;
                case Objects::Wall :
                    return "wall2.png";
                    break;
                default:
                    return "tilewood1.png";
                    break;
            }
        }
        
        void CTile::createVisualElements()
        {
            
        }
    }
}
