Example #1
0
        private void SetEffect()
        {
            switch (seasonState.GetNowSeason())
            {
            case eSeason.Summer:
                routeEffect.RegisterImage("P_Flower_", 4);
                routeEffect.SetState(0.1f, 10, -65);
                routeEffect.SetAliveSecond(2);
                break;

            case eSeason.Winter:
                routeEffect.RegisterImage("P_Ice_", 5);
                routeEffect.SetState(0.08f, 0, -20);
                routeEffect.SetAliveSecond(3);
                break;
            }
        }
Example #2
0
        /// <summary>
        /// 初期化
        /// </summary>
        public void Initialize()
        {
            isEnd = false;
            resourceLoader.Initialize();
            totalResouceNum = resourceLoader.Count;

            resourceManager.LoadFont("HGPop");
            resourceManager.LoadTextures("A_Player_Run", "./IMAGE/Animetions/");
            for (int i = 0; i < 4; i++)
            {
                resourceManager.LoadTextures("P_Flower_" + i, "./IMAGE/Particles/");
            }
            resourceManager.LoadTextures("P_Rain", "./IMAGE/Particles/");
            resourceManager.LoadTextures("P_Leaf", "./IMAGE/Particles/");
            resourceManager.LoadEffect("PaticleShader", "./EFFECT/");
            resourceManager.LoadEffect("MaskShader", "./EFFECT/");


            entity = Entity.CreateEntity("Empty", "Empty", new Transform2D());
            entity.transform.Position = new Vector2(startX, 1020);

            entity.RegisterComponent(new C_Switch3());
            C_BezierPoint bezier = new C_BezierPoint();

            entity.RegisterComponent(bezier);

            C_DrawAnimetion drawComp = new C_DrawAnimetion(Vector2.One * 256, 16);

            drawComp.AddAnim("Run", new AnimData(13, 4, 0.02f, "A_Player_Run"));
            entity.RegisterComponent(drawComp);
            drawComp.SetNowAnim("Run");
            drawComp.SetSize(0.7f);

            C_SeasonState     season = new C_SeasonState(eSeason.Summer);
            C_DrawRouteEffect route  = new C_DrawRouteEffect();

            route.RegisterImage("P_Flower_", 4);
            route.SetState(0.02f, 10, -85);
            route.SetAliveSecond(2);
            route.SetSize(new Vector2(0.5f, 0.5f));
            entity.RegisterComponent(season);
            entity.RegisterComponent(route);
        }