Beispiel #1
0
        internal static DirectorCard CreateDirectorCard(string bossName, int cost, MapNodeGroup.GraphType nodeGraphType)
        {
            CharacterSpawnCard spawnCard = ScriptableObject.CreateInstance <CharacterSpawnCard>();

            spawnCard.noElites        = false;
            spawnCard.prefab          = Resources.Load <GameObject>("prefabs/charactermasters/" + bossName);
            spawnCard.forbiddenFlags  = NodeFlags.NoCharacterSpawn;
            spawnCard.requiredFlags   = NodeFlags.None;
            spawnCard.hullSize        = HullClassification.Human;
            spawnCard.occupyPosition  = false;
            spawnCard.sendOverNetwork = true;
            spawnCard.nodeGraphType   = nodeGraphType;
            spawnCard.name            = "csc" + bossName.Substring(0, bossName.IndexOf("Master"));

            DirectorCard directorCard = new DirectorCard();

            directorCard.spawnCard               = spawnCard;
            directorCard.cost                    = cost;
            directorCard.selectionWeight         = 1;
            directorCard.allowAmbushSpawn        = true;
            directorCard.forbiddenUnlockable     = "";
            directorCard.minimumStageCompletions = 0;
            directorCard.preventOverhead         = true;
            directorCard.spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard;

            return(directorCard);
        }
Beispiel #2
0
 public InteractableTemplate(GameObject interactablePrefab, Category interactableCategory, int selectionWeight = 3, bool sendOverNetwork = true, HullClassification hullSize = HullClassification.Golem, MapNodeGroup.GraphType nodeGraphType = MapNodeGroup.GraphType.Ground, int directorCreditCost = 15, bool occupyPosition = true, SpawnCard.EliteRules eliteRules = SpawnCard.EliteRules.Default, bool orientToFloor = true, bool slightlyRandomizeOrientation = false, bool skipSpawnWhenSacrificeArtifactEnabled = false, NodeFlags requiredFlags = NodeFlags.None, NodeFlags forbiddenFlags = NodeFlags.None, DirectorCore.MonsterSpawnDistance spawnDistance = DirectorCore.MonsterSpawnDistance.Standard, bool allowAmbushSpawn = true, bool preventOverhead = false, int minimumStageCompletions = 0, UnlockableDef requiredUnlockableDef = null, UnlockableDef forbiddenUnlockableDef = null, bool multiplayerOnly = false, int minimumCount = 0)
 {
     this.interactablePrefab                    = interactablePrefab;
     this.interactableCategory                  = interactableCategory;
     this.selectionWeight                       = selectionWeight;
     this.minimumCount                          = minimumCount;
     this.sendOverNetwork                       = sendOverNetwork;
     this.hullSize                              = hullSize;
     this.nodeGraphType                         = nodeGraphType;
     this.directorCreditCost                    = directorCreditCost;
     this.occupyPosition                        = occupyPosition;
     this.eliteRules                            = eliteRules;
     this.orientToFloor                         = orientToFloor;
     this.slightlyRandomizeOrientation          = slightlyRandomizeOrientation;
     this.skipSpawnWhenSacrificeArtifactEnabled = skipSpawnWhenSacrificeArtifactEnabled;
     this.requiredFlags                         = requiredFlags;
     this.forbiddenFlags                        = forbiddenFlags;
     this.spawnDistance                         = spawnDistance;
     this.allowAmbushSpawn                      = allowAmbushSpawn;
     this.preventOverhead                       = preventOverhead;
     this.minimumStageCompletions               = minimumStageCompletions;
     this.requiredUnlockableDef                 = requiredUnlockableDef;
     this.forbiddenUnlockableDef                = forbiddenUnlockableDef;
     this.multiplayerOnly                       = multiplayerOnly;
 }
Beispiel #3
0
        // Token: 0x06001D85 RID: 7557 RVA: 0x00089C04 File Offset: 0x00087E04
        public void BuildLinks(ReadOnlyCollection <MapNode> nodes, MapNodeGroup.GraphType graphType)
        {
            this.links.Clear();
            Vector3 position = base.transform.position;

            MapNode.MoveProbe moveProbe = new MapNode.MoveProbe();
            moveProbe.Init();
            switch (graphType)
            {
            case MapNodeGroup.GraphType.Ground:
                this.BuildGroundLinks(nodes, moveProbe);
                break;

            case MapNodeGroup.GraphType.Air:
                this.BuildAirLinks(nodes, moveProbe);
                break;

            case MapNodeGroup.GraphType.Rail:
                this.BuildRailLinks(nodes, moveProbe);
                break;
            }
            foreach (MapNodeLink mapNodeLink in base.GetComponents <MapNodeLink>())
            {
                if (mapNodeLink.other)
                {
                    MapNode.Link link = new MapNode.Link
                    {
                        nodeB         = mapNodeLink.other,
                        distanceScore = Vector3.Distance(position, mapNodeLink.other.transform.position),
                        minJumpHeight = mapNodeLink.minJumpHeight,
                        gateName      = mapNodeLink.gateName,
                        hullMask      = -1
                    };
                    bool flag = false;
                    for (int j = 0; j < this.links.Count; j++)
                    {
                        if (this.links[j].nodeB == mapNodeLink.other)
                        {
                            this.links[j] = link;
                            flag          = true;
                            break;
                        }
                    }
                    if (!flag)
                    {
                        this.links.Add(link);
                    }
                }
            }
            moveProbe.Destroy();
        }
        // Token: 0x06001526 RID: 5414 RVA: 0x000659EB File Offset: 0x00063BEB
        public NodeGraph GetNodeGraph(MapNodeGroup.GraphType nodeGraphType)
        {
            switch (nodeGraphType)
            {
            case MapNodeGroup.GraphType.Ground:
                return(this.groundNodes);

            case MapNodeGroup.GraphType.Air:
                return(this.airNodes);

            case MapNodeGroup.GraphType.Rail:
                return(this.railNodes);

            default:
                return(null);
            }
        }
Beispiel #5
0
 public InteractableTemplate()
 {
     this.minimumCount            = 0;
     this.selectionWeight         = 3;
     this.spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard;
     this.allowAmbushSpawn        = true;
     this.preventOverhead         = false;
     this.minimumStageCompletions = 0;
     this.sendOverNetwork         = true;
     this.hullSize                              = HullClassification.Golem;
     this.nodeGraphType                         = MapNodeGroup.GraphType.Ground;
     this.requiredFlags                         = NodeFlags.None;
     this.forbiddenFlags                        = NodeFlags.None;
     this.directorCreditCost                    = 15;
     this.occupyPosition                        = true;
     this.eliteRules                            = SpawnCard.EliteRules.Default;
     this.orientToFloor                         = true;
     this.slightlyRandomizeOrientation          = false;
     this.skipSpawnWhenSacrificeArtifactEnabled = false;
     this.multiplayerOnly                       = false;
 }