示例#1
0
    public void UseProps(int propsNo)
    {
        PropsLogicObject logicObject = this.m_Props[propsNo];

        logicObject.Use();
        if (logicObject.Data.RemainingUseTime == 0)
        {
            this.m_Props.Remove(propsNo);
        }
    }
示例#2
0
    public void GenerateProps(int propsNo, PropsType propsType)
    {
        PropsData       data       = new PropsData();
        PropsConfigData configData = ConfigInterface.Instance.PropsConfigHelper.GetPropsData(propsType);

        data.PropsNo          = propsNo;
        data.RemainingUseTime = configData.MaxUseTimes;
        data.RemainingCD      = configData.CD;
        data.PropsConfigData  = configData;
        data.PropsType        = propsType;
        data.IsInBattle       = false;

        PropsLogicObject logicObject = new PropsLogicObject(data);

        this.m_Props.Add(propsNo, logicObject);
    }