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);
                    }
                }
            }
        }
Exemple #2
0
        public IPrototype[] GetBlueprint(BlueprintTag blueprintTag)
        {
            var ea = new DrawingBlueprintEventArgs(blueprintTag);

            OnDrawingBlueprint(ea);

            return(ea.Data);
        }
Exemple #3
0
        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);
            }
        }
Exemple #4
0
 public DrawingBlueprintEventArgs(BlueprintTag blueprintTag)
 {
     BlueprintTag = blueprintTag;
 }