allyMonser is a CCSprite (Inheritance). When I use schedule, allyMonster is NULL in action(). But, When I call action() directly, allyMonster is Not NULL, it is normal.
When I run this code, the log shows:
1, 0x23ds566
2, 0xfffffff
I want know the reason 1, 0x23ds566 -> 2, 0xfffffff. Why does it change?
void AMS_Moving::runAction()
{
allyMonster->unscheduleAllSelectors();
allyMonster->stopAllActions();
allyMonster->schedule( schedule_selector( AMS_Moving::action ) );
CCLog("1. %x", allyMonster);
}
void AMS_Moving::action()
{
CCLog("2. %x", allyMonster);
...
...
}