view ppe/chara_state2.cc @ 22:0440f2f19f23

not working.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Sun, 26 Dec 2010 22:54:11 +0900
parents 5f1abbe03b9a
children 39e643fc4f90
line wrap: on
line source

#include "task_base.h"
#include "task_object.h"

SchedDefineTask(State2);

static int
run(SchedTask *smanager, void *rbuf, void *wbuf)
{
    CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);
    
    p->vy -= 0.25;
    p->y += p->vy;
    
    p->task = STATE2;
    smanager->swap();
    return 0;
}