Exemplo n.º 1
0
    void RefreshWithActions(ActorProp obj)
    {
        if (obj == null)
        {
            return;
        }
        ActorActionControl accontrol = obj.ActorLogicObj.ActionControl;

        if (accontrol != null)
        {
            for (int i = 0; i < accontrol.ActionList.Count; i++)
            {
                ActorAction ac  = accontrol.ActionList[i];
                string      str = ac.GetActionType().ToString();
                m_strs.Add(str);
            }
            return;
        }
        else
        {
            Trap tmpTrap = obj.ActorLogicObj as Trap;
            TrapActionControl trapActionControl = tmpTrap.mActionControl;
            for (int i = 0; i < trapActionControl.ActionList.Count; i++)
            {
                TrapAction ac  = trapActionControl.ActionList[i];
                string     str = ac.GetActionType().ToString();
                m_strs.Add(str);
            }
        }
    }
Exemplo n.º 2
0
    public Trap(int id, int staticID, CSItemGuid guid)
        : base(id, staticID, guid)
    {
        //重新设置ActionControl
        mActionControl = new TrapActionControl(this);
        //重新设置AinmationControl
        mAnimationControl = new TrapAnimationControl(this);
        //读取机关信息
        CurrentTableInfo = GameTable.TrapInfoTableAsset.Lookup(staticID);
        mTrapCampType    = (TrapCampType)CurrentTableInfo.CampType;
        m_IsNeedKey      = CurrentTableInfo.NeedKey;
        //创建TrapAI
        IsInitAIDataList = false;

        //设置Props信息
        Props = ENProperty.Singleton.CreatePropertySet("SOBTrap");
        SetPropertyObjectID((int)MVCPropertyID.enActorStartID + id);
        //存储表ID
        IDInTable = staticID;
        InitProps();
    }