Exemple #1
0
        public override void Extract()
        {
            //Extract Covers
            object JSONCovers;

            jsonParseResult.TryGetValue("Covers", out JSONCovers);
            object[] Coverlist = JSONCovers as object[];

            foreach (object Obj in Coverlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Cover   cover   = TermParser.GetCoverForTerm(Dict);
                Subject subject = GetSubjectForCover(Dict);
                if (CoverComponent.ContainsKey(subject))
                {
                    CoverComponent[subject].Add(cover.CoverName, cover);
                }
                else
                {
                    CoverComponent.Add(subject, new Dictionary <string, Cover>()
                    {
                        { cover.CoverName, cover }
                    });
                }
            }
        }
Exemple #2
0
    /*private struct InventoryWeapons {
     *  BaseWeapon weaponStats;
     *  int currAmmo;
     * }*/

    private void Start()
    {
        activeCam           = FPCam;
        coverComp           = GetComponent <CoverComponent>();
        noiseEmitter        = GetComponent <PawnNoiseEmitterComponent>();
        interactComp        = GetComponent <InteractComponent>();
        animController      = GetComponentInChildren <Animator>();
        collider            = GetComponent <CapsuleCollider>();
        startColliderHeight = collider.height;
        heroState           = new StandingState();
        heroState.Enter(this);
    }
Exemple #3
0
        public override void Extract()
        {
            //Extract Deductibles
            object JSONDeductibles;

            jsonParseResult.TryGetValue("Deductibles", out JSONDeductibles);
            object[] Dedlist = JSONDeductibles as object[];

            foreach (object Obj in Dedlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Deductible ded = TermParser.GetDedForTerm(Dict, Declarations);
                foreach (PrimarySubject priSub in GetSubjectForTerm(Dict))
                {
                    if (DedComponent.ContainsKey(priSub))
                    {
                        DedComponent[priSub].Add(ded);
                    }
                    else
                    {
                        DedComponent.Add(priSub, new DeductibleCollection(ded));
                    }
                }
            }

            //Extract Sublimits
            object JSONLimits;

            jsonParseResult.TryGetValue("Sublimits", out JSONLimits);
            object[] Limlist = JSONLimits as object[];

            foreach (object Obj in Limlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Limit ded = TermParser.GetLimitForTerm(Dict, Declarations);
                foreach (PrimarySubject priSub in GetSubjectForTerm(Dict))
                {
                    if (LimComponent.ContainsKey(priSub))
                    {
                        LimComponent[priSub].Add(ded);
                    }
                    else
                    {
                        LimComponent.Add(priSub, new LimitCollection(ded));
                    }
                }
            }

            //Extract Covers
            object JSONCovers;

            jsonParseResult.TryGetValue("Covers", out JSONCovers);
            object[] Coverlist = JSONCovers as object[];

            foreach (object Obj in Coverlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Cover   cover   = TermParser.GetCoverForTerm(Dict);
                Subject subject = GetSubjectForCover(Dict);
                if (CoverComponent.ContainsKey(subject))
                {
                    CoverComponent[subject].Add(cover.CoverName, cover);
                }
                else
                {
                    CoverComponent.Add(subject, new Dictionary <string, Cover>()
                    {
                        { cover.CoverName, cover }
                    });
                }
            }
        }