示例#1
0
    private void PassSeason()
    {
        switch (curSeason)
        {
        case eSeason.SPRING:
            objFlower.SetActive(false);
            objRain.SetActive(true);
            transLight.GetComponentInChildren <Light>().intensity = 0.3f;
            curSeason = eSeason.SUMMER;
            break;

        case eSeason.SUMMER:
            objRain.SetActive(false);
            objMaple.SetActive(true);
            transLight.GetComponentInChildren <Light>().intensity = 1.0f;
            curSeason = eSeason.FALL;
            break;

        case eSeason.FALL:
            objMaple.SetActive(false);
            objSnow.SetActive(true);
            transLight.GetComponentInChildren <Light>().intensity = 0.5f;
            curSeason = eSeason.WINTER;
            break;

        case eSeason.WINTER:
            objSnow.SetActive(false);
            objFlower.SetActive(true);
            transLight.GetComponentInChildren <Light>().intensity = 1.0f;
            curSeason = eSeason.SPRING;
            break;
        }
    }
示例#2
0
        private void Purify()
        {
            if (isPurify)
            {
                return;
            }
            if (!collider.ThroughStart("PlayerSkill"))
            {
                return;
            }
            if (myState.GetNowSeason() != eSeason.None)
            {
                return;
            }
            if (otherState == null)
            {
                otherState = (C_SeasonState)collider.GetOtherEntity("PlayerSkill").GetUpdateComponent("C_SeasonState");
            }

            isPurify   = true;
            nextSeason = otherState.GetNowSeason();
            effectTimer.Initialize();
            drawComp.SetShaderOn(effectTimer.GetLimitTime() - 0.01f, "A_Shrub_" + nextSeason, "ShrubMask");
            if (nextSeason == eSeason.Spring)
            {
                drawComp.SetDepth(18);
            }
        }
示例#3
0
 public C_SeasonState(eSeason season = eSeason.Spring)
 {
     nowSeason = season;
     skillCD   = new List <int>()
     {
         10, 20, 15, 20, 0
     };
     canSkill   = true;
     skillTimer = new Timer(skillCD[(int)nowSeason]);
     rect       = new Rectangle((int)nowSeason * 48, 0, 48, 48);
 }
示例#4
0
        public void ToBeforeSeason()
        {
            int index = (int)nowSeason;

            if (index - 1 < 0)
            {
                index = index - 1 + (int)eSeason.None;
            }
            else
            {
                index--;
            }
            nowSeason = (eSeason)index;
        }
示例#5
0
        public void ToNextSeason()
        {
            int index = (int)nowSeason;

            if (index + 1 >= (int)eSeason.None)
            {
                index = index + 1 - (int)eSeason.None;
            }
            else
            {
                index++;
            }
            nowSeason = (eSeason)index;
        }
示例#6
0
        public C_UpdateShrubState(GameDevice gameDevice)
        {
            this.gameDevice = gameDevice;
            nextSeason      = eSeason.Spring;

            effectNames1 = new List <string>()
            {
                "P_Sakura", "P_Leaf", "P_MapleLeafYellow", "P_SnowFlake"
            };
            effectNames2 = new List <string>()
            {
                "P_Sakura", "P_Rain", "P_MapleLeafRed", "P_Snow"
            };
            effectTimer = new Timer(1.5f);
            effectTimer.SetIsTime();

            isPurify = false;
        }
示例#7
0
 public Rectangle GetRect(eSeason season)
 {
     return(rect);
 }
示例#8
0
 public void SetNowSeason(eSeason season)
 {
     nowSeason = season;
 }