Exemple #1
0
        void OnEnable()
        {
            restProbability       = serializedObject.FindProperty("restProbability");
            merchantProbability   = serializedObject.FindProperty("merchantProbability");
            settlementProbability = serializedObject.FindProperty("settlementProbability");
            treasureProbability   = serializedObject.FindProperty("treasureProbability");
            nothingProbability    = serializedObject.FindProperty("nothingProbability");
            tileProbability       = serializedObject.FindProperty("tileProbability");
            tileSize       = serializedObject.FindProperty("tileSize");
            tilePaddingX   = serializedObject.FindProperty("tilePaddingX");
            tilepaddingY   = serializedObject.FindProperty("tilePaddingY");
            islandSize     = serializedObject.FindProperty("islandSize");
            minAdjacency   = serializedObject.FindProperty("minAdjacency");
            maxRests       = serializedObject.FindProperty("maxRests");
            maxMerchants   = serializedObject.FindProperty("maxMerchants");
            maxSettlements = serializedObject.FindProperty("maxSettlements");
            maxTreasure    = serializedObject.FindProperty("maxTreasure");
            maxSteps       = serializedObject.FindProperty("maxSteps");
            center         = serializedObject.FindProperty("center");
            distribution   = serializedObject.FindProperty("distribution");
            fillHoles      = serializedObject.FindProperty("fillHoles");
            overWriteCells = serializedObject.FindProperty("overwriteCells");
            connectCells   = serializedObject.FindProperty("connectCells");
            customCenter   = serializedObject.FindProperty("customCenter");
            debug          = serializedObject.FindProperty("debug");
            customProb     = serializedObject.FindProperty("customProb");
            tile           = serializedObject.FindProperty("tile");
            parent         = serializedObject.FindProperty("parent");
            onMove         = serializedObject.FindProperty("onMove");
            onSet          = serializedObject.FindProperty("onSet");
            onCenter       = serializedObject.FindProperty("onCenter");
            onBoundary     = serializedObject.FindProperty("onBoundary");
            onRandom       = serializedObject.FindProperty("onRandom");

            procGen = (ProcAgent)target;
        }
Exemple #2
0
        public void MoveToRandomCell(ProcData data)
        {
            ProcAgent agent = data.agent;

            agent.Vertex = agent.RandomPoint();
        }