Exemplo n.º 1
0
        public void Initialize(Land ptrLand, Drawer ptrDrawer)
        {
            Land = ptrLand;

            //ActクラスにCreateCreature用インターフェースポインタを登録
            Act.CreatureMgr = this;
            Act.Land        = Land;

            //仮 Creatureのグラフィックを読み込み
            Creature.LoadGraphic(ptrDrawer);


            //Creatureの登録
            for (int i = 0; i < Program.MaxCreature; i++)
            {
                CreatureList.Add(new Creature(this));
            }
        }
Exemplo n.º 2
0
 public override void Update()
 {
     if (ClickFlag == true)
     {
         float           temDistance = 10000;//同エリア内でのカーソルと生物との暫定最短距離
         List <Creature> CList       = Land.GetCList(clickPosition);
         foreach (Creature creature in CList.Where(x => x.Alive))
         {
             Vector2D creaturePos = clickPosition - creature.Position;
             if (temDistance > creaturePos.SquareLength)
             {
                 temDistance = creaturePos.SquareLength;
                 Object      = creature;
             }
         }
         ClickFlag = false;
     }
 }
Exemplo n.º 3
0
 public void Initialize(Land land)
 {
     landFormBase = new LandFormBase[Program.Space_X, Program.Space_Y];
     for (int x = 0; x < Program.Space_X; x++)
     {
         for (int y = 0; y < Program.Space_Y; y++)
         {
             if (Program.Rand.Next(10) == 0)
             {
                 SetLandform(CreateLandform(1), x, y);
             }
             else
             {
                 SetLandform(CreateLandform(0), x, y);
             }
             landFormBase[x, y].Initialize(this, x, y);
         }
     }
 }
Exemplo n.º 4
0
        public void Initialize(Land land, Drawer drawer)
        {
            icons       = new Icon[3];
            Drawer      = drawer;
            Icon.Drawer = drawer;
            Icon.Land   = land;

            //各アイコンクラスの初期化
            icons[0] = new IconScan();
            icons[1] = new IconThunderbolt();
            icons[2] = new IconLandScan();

            foreach (Icon icon in icons)
            {
                icon.Initialize();
            }

            //仮 アイコン用グラフィックの読み込み
            angelGH = DX.LoadGraph("Data/テンシ大.png");

            //初期選択アイコンを設定
            leftClick  = 0;
            rightClick = 1;
        }