Mercurial > hg > Members > koba > t_dandy
view spe/chara_state22.cc @ 69:1c57e38fb9b5
fix xml files ( model /c_xyz )
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 22 May 2011 10:19:58 +0900 |
parents | c330ded6d728 |
children | f4140672ef9f |
line wrap: on
line source
#include "chara_state22.h" #include "tobject.h" SchedDefineTask(STATE22); static int run(SchedTask *smanager, void *rbuf, void *wbuf) { CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); int sf; sf = rand() % 4; if((sf == 0) || (sf == 1)) { p->x = -35; p->y = rand() % (120 - 35); p->vx = (rand() % 4 + 1); p->vy = rand() % 3 + 1; p->task = STATE23; } if((sf == 2)) { p->x = rand() % 290; p->y = -30; p->vx = rand() % 3 - 1; p->vy = (rand() % 4 + 1); p->task = STATE23; } if(sf == 3) { p->x = 320; p->y = rand() % (120 - 35); p->vx = (rand() % 4 + 1) * -1; p->vy = rand() % 3 -1; p->task = STATE23; } return 0; }