123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- namespace loyalsoft;
- /**
- * Description of Info_Store
- *
- * @author c'y'zhao
- */
- class Info_Store extends Object_ext {
-
- /**
- * 道具
- * @var type
- */
- public $items;
-
- /**
- * 装备
- * @var type
- */
- public $equip;
-
- public function initialize() {
- $this->items = new \stdClass();
- $this->equip = new \stdClass();
- }
-
- public function __construct($arg = null) {
- if($tag == null){
- $this->items = new \stdClass();
- $this->equip = new \stdClass();
- }else{
- parent::__construct($arg);
- }
- }
-
- public function removeItem($itemId,$num) {
- if(StlUtil::dictHasProperty($this->items, $itemId)){
- $this->items->$itemId -= $num;
- if($this->items->$itemId <= 0){
- unset($this->items->$itemId);
- }
- }
-
-
- }
- }
|