Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11914


Ignore:
Timestamp:
Apr 26, 2018, 4:06:31 PM (6 years ago)
Author:
jacobsr
Message:

experimental moving cubes

Location:
code/branches/OrxyRoad_FS18
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxyRoad_FS18/data/levels/templates/OrxyRoadPattern.oxt

    r11853 r11914  
    6060
    6161</Template>
     62
     63<Template name=SingleOrxyRoadCube>
     64 
     65        <OrxyRoadCube position="0,0,0" direction="0,0,0"   scale="1" collisionType=dynamic mass=1 friction=0.01 >
     66      <attached>
     67        <Model position="0,0,0"                 mesh="CuboidBody.mesh"          scale3D="300,50,50"     />
     68               
     69      </attached>
     70      <collisionShapes>
     71                <BoxCollisionShape position="0,0,0"                             halfExtents="300,50,50"         />
     72               
     73      </collisionShapes>
     74        </OrxyRoadCube>
     75
     76</Template>
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoad.cc

    r11899 r11914  
    5555        b_combo = false;
    5656        counter = 5000;
    57         pattern = 1;
     57        pattern = 3;
    5858        lastPosition = 0;
    5959        // spawn enemy every 3.5 seconds
     
    112112            {
    113113                counter = 0;
    114                 for(int i = 0; i<6; i++)
     114                for(int j = 0; j < 3; j++)
    115115                {
    116                     OrxyRoadCube* cube = new OrxyRoadCube(this->center_->getContext());
    117                     cubeList.push_back(cube);
    118                     switch(pattern)
     116                    for(int i = -30; i<30; i++)
    119117                    {
    120                     case 1: cube->addTemplate("OrxyRoadCube01");
    121                     break;
    122                     case 2: cube->addTemplate("OrxyRoadCube01");
    123                     break;
    124 
     118                        OrxyRoadCube* cube = new OrxyRoadCube(this->center_->getContext());
     119                        cubeList.push_back(cube);
     120                        switch(pattern)
     121                        {
     122                        case 1: cube->addTemplate("OrxyRoadCube01");
     123                        break;
     124                        case 2: cube->addTemplate("OrxyRoadCube01");
     125                        break;
     126                        case 3: cube->addTemplate("SingleOrxyRoadCube");
     127
     128                        }
     129
     130                        cube->setPosition(player->getWorldPosition() + Vector3(1000.0f+j*800.0f, 0.0f, i*600.0f+j*300));
     131                       
     132                        /* experimental */
     133
     134                        cube->setVelocity(0,0,500);
     135
     136                        /* experimental */
     137
     138
     139                        //stEntity->setScale3D(50,50,50);
    125140                    }
    126 
    127                     cube->setPosition(player->getWorldPosition() + Vector3(5000.0f, 0.0f, -3600.0f + (i*1200)));
    128                    
    129                     /* experimental */
    130 
    131                     //cube->setVelocity(10,0,0);
    132 
    133                     /* experimental */
    134 
    135 
    136                     //stEntity->setScale3D(50,50,50);
    137141                }
    138142
    139143
    140                 pattern %= 2;
    141                 pattern ++;
     144                //pattern %= 2;
     145                //pattern ++;
    142146
    143147            }
Note: See TracChangeset for help on using the changeset viewer.