Ejemplo n.º 1
0
        //アクセラレータデータをRainに登録
        void RegisterWallRainColligeData(Rain rain)
        {
            KeyValuePair <float, float> lessThan     = new KeyValuePair <float, float>();
            KeyValuePair <float, float> lessEqual    = new KeyValuePair <float, float>();
            KeyValuePair <float, float> greaterEqual = new KeyValuePair <float, float>();
            KeyValuePair <float, float> greaterThan  = new KeyValuePair <float, float>();

            GetBoundKeys <float, float>(PairsOfWall, rain.Position.X, out lessThan, out lessEqual, out greaterEqual, out greaterThan);
            rain.YLimit = lessEqual.Value - 5.0f;
        }
Ejemplo n.º 2
0
        //初期化
        static bool Init()
        {
            if (!asd.Engine.Initialize("KAMI_HIKOKI", 640, 480, new asd.EngineOption()))
            {
                return(false);
            }

            asd.Engine.File.AddRootPackageWithPassword("Resource.pack", "god");

            if (!Wall.Init())
            {
                return(false);
            }
            if (!Cloud.Init())
            {
                return(false);
            }
            if (!Rain.Init())
            {
                return(false);
            }
            if (!Healer.Init())
            {
                return(false);
            }
            if (!Wind.Init())
            {
                return(false);
            }

            int best = 0;

            try
            {
                StreamReader file = new StreamReader("Score", Encoding.Default);
                best = Convert.ToInt32(file.ReadLine());
                file.Close();
            }
            catch
            {
                System.Diagnostics.Debug.Write("Error");
            }

            Game = new GameMgr(best, false);
            asd.Engine.ChangeScene(Game);

            return(true);
        }
Ejemplo n.º 3
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);
         }
     }
 }