Exemple #1
0
        public bool Setup(bool lock_flag, int story_part)
        {
            this.mStoryNum   = 1;
            this.mLockFlag   = false;
            this.mAlphaState = StoryPartIcon.AlphaState.None;
            if (Object.op_Equality((Object)this.IconGo, (Object)null) || Object.op_Equality((Object)this.LockGo, (Object)null) || (Object.op_Equality((Object)this.LockCover, (Object)null) || Object.op_Equality((Object)this.LockCoverPart, (Object)null)) || (Object.op_Equality((Object)this.LockOpen, (Object)null) || Object.op_Equality((Object)this.BlurIcon, (Object)null) || Object.op_Equality((Object)this.BlurIcon2, (Object)null)))
            {
                return(false);
            }
            ImageArray component = (ImageArray)this.IconGo.GetComponent <ImageArray>();

            if (Object.op_Equality((Object)component, (Object)null) || story_part > component.Images.Length)
            {
                return(false);
            }
            int num = story_part - 1;

            this.mStoryNum = story_part;
            this.mLockFlag = lock_flag;
            if (!lock_flag)
            {
                this.IconGo.SetActive(true);
                this.LockGo.SetActive(false);
                this.IconMask.SetActive(true);
                this.LockMask.SetActive(false);
                this.LockTitleMask.SetActive(false);
                component.ImageIndex = num;
            }
            else
            {
                component.ImageIndex = num;
                this.IconGo.SetActive(false);
                this.LockGo.SetActive(true);
                this.IconMask.SetActive(false);
                this.LockMask.SetActive(true);
                this.LockTitleMask.SetActive(true);
                this.LockCover.ImageIndex     = num;
                this.LockCoverPart.ImageIndex = num;
                this.LockOpen.ImageIndex      = num;
                this.BlurIcon.ImageIndex      = num;
                this.BlurIcon2.ImageIndex     = num;
                if (Object.op_Inequality((Object)this.TxtConditions, (Object)null))
                {
                    string storyPartWorldName = MonoSingleton <GameManager> .Instance.GetReleaseStoryPartWorldName(this.StoryNum);

                    if (storyPartWorldName != null)
                    {
                        this.TxtConditions.set_text(string.Format(LocalizedText.Get("sys.STORYPART_RELEASE_TIMING"), (object)storyPartWorldName));
                    }
                }
            }
            ((ImageArray)this.IconMask.GetComponent <ImageArray>()).ImageIndex      = num;
            ((ImageArray)this.LockMask.GetComponent <ImageArray>()).ImageIndex      = num;
            ((ImageArray)this.LockTitleMask.GetComponent <ImageArray>()).ImageIndex = num;
            return(true);
        }
Exemple #2
0
 public void SetMask(bool mask_flag)
 {
     if (mask_flag)
     {
         if (this.mAlphaState != StoryPartIcon.AlphaState.Fadeout)
         {
             this.mCountDelat = 0.0f;
         }
         this.mAlphaState = StoryPartIcon.AlphaState.Fadeout;
     }
     else
     {
         if (this.mAlphaState != StoryPartIcon.AlphaState.Fadein)
         {
             this.mCountDelat = 0.0f;
         }
         this.mAlphaState = StoryPartIcon.AlphaState.Fadein;
     }
 }