コード例 #1
0
ファイル: CastleGate.cs プロジェクト: putao520/mir2
        public override void Spawned()
        {
            base.Spawned();

            if (BlockArray == null)
            {
                return;
            }

            MonsterInfo bInfo = new MonsterInfo
            {
                HP      = this.HP,
                Image   = Monster.EvilMirBody,
                CanTame = false,
                CanPush = false,
                AutoRev = false
            };

            foreach (var block in BlockArray)
            {
                BlockingObject b = new BlockingObject(this, bInfo);
                BlockingObjects.Add(b);

                if (!b.Spawn(this.CurrentMap, new Point(this.CurrentLocation.X + block.X, this.CurrentLocation.Y + block.Y)))
                {
                    MessageQueue.EnqueueDebugging(string.Format("{3} blocking mob not spawned at {0} {1}:{2}", CurrentMap.Info.FileName, block.X, block.Y, Info.Name));
                }
            }
        }
コード例 #2
0
ファイル: CastleGate.cs プロジェクト: Pete107/Mir2
        public override void Spawned()
        {
            base.Spawned();

            if (BlockArray == null) return;

            MonsterInfo bInfo = new MonsterInfo
            {
                HP = this.HP,
                Image = Monster.EvilMirBody,
                CanTame = false,
                CanPush = false,
                AutoRev = false
            };        

            foreach (var block in BlockArray)
            {
                BlockingObject b = new BlockingObject(this, bInfo);
                BlockingObjects.Add(b);

                if (!b.Spawn(this.CurrentMap, new Point(this.CurrentLocation.X + block.X, this.CurrentLocation.Y + block.Y)))
                {
                    SMain.EnqueueDebugging(string.Format("CastleGate blocking mob not spawned at {0} {1}:{2}", CurrentMap.Info.FileName, block.X, block.Y));
                }
            }
        }