private void CreateAltar() { BlueprintTag[] tags = new BlueprintTag[] { BlueprintTag.Altar, BlueprintTag.Floor, BlueprintTag.Trap, BlueprintTag.Actor, BlueprintTag.AimMarker, BlueprintTag.ExamineMarker, }; IPrototype[] prototypes; GameObject[] gameObjects; int[] position; foreach (BlueprintTag t in tags) { prototypes = GetComponent <Blueprint>().GetBlueprint(t); gameObjects = GetComponent <CreateObject>().Create(prototypes); // Game objects inside the dungeon board are invisible for now // and they will be visible after the whole world is created. // This is used to fix a visual glitch. foreach (GameObject go in gameObjects) { position = go.GetComponent <MetaInfo>().Position; if (!GetComponent <DungeonBoard>().IndexOutOfRange( position[0], position[1])) { go.GetComponent <Renderer>().enabled = false; board[position[0], position[1]].Push(go); } } } }
public IPrototype[] GetBlueprint(BlueprintTag blueprintTag) { var ea = new DrawingBlueprintEventArgs(blueprintTag); OnDrawingBlueprint(ea); return(ea.Data); }
private void CreateAltar() { BlueprintTag[] tags = new BlueprintTag[] { BlueprintTag.Altar, BlueprintTag.Floor, BlueprintTag.Trap, BlueprintTag.Actor, BlueprintTag.AimMarker, }; IPrototype[] proto; foreach (BlueprintTag t in tags) { proto = GetComponent <Blueprint>().GetBlueprint(t); GetComponent <CreateObject>().Create(proto); } }
public DrawingBlueprintEventArgs(BlueprintTag blueprintTag) { BlueprintTag = blueprintTag; }