Exemplo n.º 1
0
 //雨生成
 void GenerateRain()
 {
     foreach (var item in LayerOfMain.Objects)
     {
         if (item is Cloud)
         {
             if (item.Position.X > CameraOfMain.Src.Position.X + CameraOfMain.Src.Width + 1300.0f)
             {
                 continue;
             }
             Rain rain = ((Cloud)item).GenerateRain();
             if (rain == null)
             {
                 continue;
             }
             LayerOfMain.AddObject(rain);
             Rains.Add(rain);
             RegisterWallRainColligeData(rain);
         }
     }
 }
Exemplo n.º 2
0
        //敵オブジェクト配置
        void CreateObject(asd.Vector2DF position, int obj)
        {
            switch (obj)
            {
            case 0:
                Walls.Add(new Wall(position));
                LayerOfMain.AddObject(Walls[Walls.Count - 1]);
                SetWallRainColligeData(Walls[Walls.Count - 1].Position);
                break;

            case 1:
                Clouds.Add(new Cloud(position, TypeOfCloud.Small));
                LayerOfMain.AddObject(Clouds[Clouds.Count - 1]);
                break;

            case 2:
                Clouds.Add(new Cloud(position, TypeOfCloud.Medium));
                LayerOfMain.AddObject(Clouds[Clouds.Count - 1]);
                break;

            case 3:
                Clouds.Add(new Cloud(position, TypeOfCloud.Large));
                LayerOfMain.AddObject(Clouds[Clouds.Count - 1]);
                break;

            case 4:
                break;

            case 5:
                Healers.Add(new Healer(position));
                LayerOfMain.AddObject(Healers[Healers.Count - 1]);
                break;

            case 6:
                Winds.Add(new Wind(position));
                LayerOfMain.AddObject(Winds[Winds.Count - 1]);
                break;
            }
        }