[ 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, ], ]; public function renewStatus(User $user) { $this->status['counter'] = $user->getCard(); } public function decreaseEachCard($obj, User $user) { $cardToDecrease = [];//需要扣减的卡牌 foreach ($obj->gameData['card']['valid-types'] as $t) { $cardToDecrease[$t] = -1; } $user->addCard($cardToDecrease); /** @var EntityManager $em */ $em = Event::app()->getEntityManager(); $em->flush(); } }
Fatal error: Class 'Vendor\Event\Common\Card' not found in /data/project/game-anniversary.oasgames.com/v2.14.1/src/Controllers/IndexController.php on line 101