Beispiel #1
0
    //添加一个部件
    public void addPart(Dictionary <string, object> partData)
    {
        int type = (int)(partData["position"]);

        //查找到 前缀名字 来判断类型 0 head 1 wing 2 tail
        this.removePart(type);
        PartAction part = (PartAction)(new PartAction(this._map).init(partData, this._player));

        part.start();
        this._parts[type] = part;
        this.dispatchEventWith(EventConstant.PART_CHANGE);
    }