Пример #1
0
    public override void InitializeAgent()
    {
        base.InitializeAgent();

        if (area == null)
        {
            area = GetComponentInParent <PersonalityQuarksArea>();
        }

        Quarks = QuarkGroup.Instantiate(Quarks);
        Quarks.Initialize(this);

        // TAG: MakeEvent area.Logger.Log(Logger.CreateMessage(LogMessageType.World, $"Initialized {Quarks.name} {gameObject.name}"), this);
    }
Пример #2
0
    public virtual void Initialize(BaseAgent agent)
    {
        foreach (QuarkGroup group in Groups)
        {
            QuarkGroup qg = QuarkGroup.Instantiate(group);
            qg.Initialize(agent);
            myGroups.Add(qg);
        }

        foreach (MLObs obs in Observations)
        {
            MLObs o = MLObs.Instantiate(obs);
            o.Initialize(agent);
            myObservations.Add(o);
        }

        foreach (MLReset reset in Resets)
        {
            MLReset r = MLReset.Instantiate(reset);
            r.Initialize(agent);
            myResets.Add(r);
        }

        foreach (MLReward reward in Rewards)
        {
            MLReward r = MLReward.Instantiate(reward);
            r.Initialize(agent);
            myRewards.Add(r);
        }

        foreach (MLAction action in Actions)
        {
            MLAction a = MLAction.Instantiate(action);
            a.Initialize(agent);
            myActions.Add(a);
        }
    }