Example #1
0
        protected override void Initialize(Entity entity)
        {
            entity.RegisterComponent(moveComp);

            routeEffect = (C_DrawRouteEffect)entity.GetDrawComponent("C_DrawRouteEffect");
            routeEffect.Awake();

            seasonState = (C_SeasonState)entity.GetUpdateComponent("C_SeasonState");
            energy      = (C_Energy)entity.GetNormalComponent("C_Energy");

            state = (C_CharaState)entity.GetNormalComponent("C_CharaState");
        }
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);
        }
Example #3
0
 protected override void Initialize(Entity entity)
 {
     seasonState = (C_SeasonState)entity.GetUpdateComponent("C_SeasonState");
     routeEffect = (C_DrawRouteEffect)entity.GetDrawComponent("C_DrawRouteEffect");
 }