コード例 #1
0
        /// <summary>
        /// Spawns a Boss enemy just on screen in the top-left corner.
        /// </summary>
        /// <param name="bossType"> The type of boss enemy to spawn.</param>
        void BossWave(BossGenerator.Boss bossType)
        {
            ICollection <IGenerator> wave = new LinkedList <IGenerator>();
            BossGenerator            g    = new BossGenerator(bossType, new Vector2(50, 50));

            wave.Add(g);
            waves.Enqueue(wave);
        }
コード例 #2
0
    private void Start()
    {
        factory = GetComponent <BossGenerator>();

        if (factory.type == BossType.NormalBoss)
        {
            desc.text = "Normal Boss";
        }
        else if (factory.type == BossType.EventBoss)
        {
            desc.text = "Event Boss";
        }

        Transform tran = this.gameObject.transform;

        factory.CreateBoss(tran);
    }
コード例 #3
0
        public static GameObject CreateBoss(int x, int y, int level)
        {
            GameObject go = GameObject.Instantiate("Boss");

            //MonsterGenerator.Fill(rand, level, go);
            BossGenerator.Fill(rand, level, go, oneInNShiny);
            go.Transform.position = new Vec2i(x, y);
            //go.transform.position.x = x;
            //go.transform.position.y = y;
            Inventory i = (Inventory)go.AddComponent(new Inventory());

            i.Add(new Item("The Ultimate Thing"));
            MapTile mt = (MapTile)go.GetComponent <MapTile>();

            //mt.character = 'ß';

            return(go);
        }