I'm currently working on a tower defense game, and I'm currently in the process of implementing the different towers. And I'm lookin for a way to set up predefined values like a config file which I can extract the different values for the different towers on build time.
I've been searching around a bit and I came across a bit of code that looks like this:
var  building_attributes  =  {
        "Wall" :  {
            Damage :  0 ,
            RANGe :  0
            speed :  0
            bullet_speed :  0
            life :  100 ,
            Shield :  500 ,
            cost :  5
        }
 };
If I implemtented this, how can I then access the different values? Or perhaps someone out there has a good solution to my problem.
All answers are much appreicated. :)
 
     
    