private void SetFade(float to, float time)
 {
     //IL_0028: Unknown result type (might be due to invalid IL or missing references)
     faderTweenAlpha.from = faderTweenAlpha.to;
     faderTweenAlpha.to   = to;
     faderTweenAlpha.get_gameObject().SetActive(true);
     faderTweenAlpha.duration = time;
     faderTweenAlpha.set_enabled(true);
     faderTweenAlpha.ResetToBeginning();
 }
Beispiel #2
0
    public static TweenAlpha Begin(GameObject go, float duration, float alpha)
    {
        TweenAlpha tweenAlpha = UITweener.Begin <TweenAlpha>(go, duration, true);

        tweenAlpha.from = tweenAlpha.value;
        tweenAlpha.to   = alpha;
        if (duration <= 0f)
        {
            tweenAlpha.Sample(1f, true);
            tweenAlpha.set_enabled(false);
        }
        return(tweenAlpha);
    }
    public bool Initialize(Character _chara, int damage, DAMAGE_COLOR color, ELEMENT_TYPE element, bool isAutoPlay = true)
    {
        //IL_001f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0025: Unknown result type (might be due to invalid IL or missing references)
        //IL_002a: Unknown result type (might be due to invalid IL or missing references)
        //IL_009f: Unknown result type (might be due to invalid IL or missing references)
        //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
        //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
        //IL_0114: Unknown result type (might be due to invalid IL or missing references)
        //IL_012a: Unknown result type (might be due to invalid IL or missing references)
        //IL_01b2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01b7: Unknown result type (might be due to invalid IL or missing references)
        chara       = _chara;
        higthOffset = damadeNum.height;
        if (!SetPosFromWorld(chara._position + offset, true))
        {
            return(false);
        }
        enable         = true;
        damadeNum.text = damage.ToString();
        switch (color)
        {
        case DAMAGE_COLOR.DAMAGE:
            if (elementColor.Count >= 0 && elementColor.Count > (int)element)
            {
                damadeNum.color       = elementColor[(int)element].main;
                damadeNum.effectColor = elementColor[(int)element].effect;
            }
            else
            {
                damadeNum.color       = elementColor[6].main;
                damadeNum.effectColor = elementColor[6].effect;
            }
            break;

        case DAMAGE_COLOR.HEAL:
            damadeNum.color       = healColor.main;
            damadeNum.effectColor = healColor.effect;
            break;
        }
        if (animPos != null)
        {
            animPos.ResetToBeginning();
            animPos.set_enabled(false);
        }
        if (animAlpha != null)
        {
            animAlpha.ResetToBeginning();
            animAlpha.set_enabled(false);
        }
        if (animScale != null)
        {
            animScale.ResetToBeginning();
            animScale.set_enabled(false);
        }
        this.get_transform().set_localScale(Vector3.get_zero());
        if (isAutoPlay)
        {
            Play();
        }
        return(true);
    }
    protected override void Awake()
    {
        //IL_006c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0071: Expected O, but got Unknown
        //IL_009e: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ae: Expected O, but got Unknown
        //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
        //IL_0101: Unknown result type (might be due to invalid IL or missing references)
        //IL_0106: Unknown result type (might be due to invalid IL or missing references)
        //IL_0114: Unknown result type (might be due to invalid IL or missing references)
        //IL_012d: Unknown result type (might be due to invalid IL or missing references)
        //IL_015d: Unknown result type (might be due to invalid IL or missing references)
        //IL_016d: Expected O, but got Unknown
        //IL_01a4: Unknown result type (might be due to invalid IL or missing references)
        //IL_01b9: Unknown result type (might be due to invalid IL or missing references)
        //IL_01be: Expected O, but got Unknown
        //IL_01cf: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d4: Expected O, but got Unknown
        //IL_01ee: Unknown result type (might be due to invalid IL or missing references)
        //IL_01f3: Expected O, but got Unknown
        //IL_020f: Unknown result type (might be due to invalid IL or missing references)
        //IL_021f: Unknown result type (might be due to invalid IL or missing references)
        //IL_022f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0241: Unknown result type (might be due to invalid IL or missing references)
        //IL_0255: Unknown result type (might be due to invalid IL or missing references)
        //IL_025a: Expected O, but got Unknown
        //IL_025f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0264: Expected O, but got Unknown
        base.Awake();
        uiRoot = this.GetComponent <UIRoot>();
        UIVirtualScreen.InitUIRoot(uiRoot);
        uiCamera = uiRoot.GetComponentInChildren <Camera>();
        cameras  = (Camera[])new Camera[1]
        {
            uiCamera
        };
        nguiCamera      = uiCamera.GetComponent <UICamera>();
        uiRootPanel     = uiRoot.GetComponent <UIPanel>();
        uiRootTransform = uiRoot.get_transform();
        initUseMouse    = nguiCamera.useMouse;
        initUseTouch    = nguiCamera.useTouch;
        system          = CreatePrefabUI(Resources.Load("UI/SystemUI"), null, null, true, base._transform, 0, null);
        system.CreateCtrlsArray(typeof(SYSTEM));
        Transform ctrl = system.GetCtrl(SYSTEM.FADER);

        faderPanel       = ctrl.get_parent().GetComponent <UIPanel>();
        faderPanel.depth = 4000;
        Vector3 position = ctrl.get_position();

        position.z = -1f;
        ctrl.set_position(position);
        Transform ctrl2 = system.GetCtrl(SYSTEM.BLOCKER);

        ctrl2.get_gameObject().SetActive(false);
        Transform ctrl3 = system.GetCtrl(SYSTEM.DIALOG_BLOCKER);

        dialogBlockerAlpha       = ctrl3.GetComponent <UIRect>().alpha;
        dialogBlockerTween       = TweenAlpha.Begin(ctrl3.get_gameObject(), 0.2f, dialogBlockerAlpha);
        dialogBlockerTween.value = 0f;
        dialogBlockerTween.from  = 0f;
        dialogBlockerTween.set_enabled(false);
        ctrl3.get_gameObject().SetActive(false);
        string text = "InternalUI/UI_Common/LoadingUI";

        SetLoadingUI(Resources.Load(text));
        internalUI = true;
        GameObject val     = new GameObject("ButtonEffectTop");
        UIPanel    uIPanel = val.AddComponent <UIPanel>();

        uIPanel.depth   = 10000;
        buttonEffectTop = val.get_transform();
        buttonEffectTop.SetParent(uiRootTransform);
        buttonEffectTop.set_localPosition(Vector3.get_zero());
        buttonEffectTop.set_localRotation(Quaternion.get_identity());
        buttonEffectTop.set_localScale(Vector3.get_one());
        val.set_layer(uiRoot.get_gameObject().get_layer());
        GameObject val2 = new GameObject("AtlasTop");

        atlasTop = val2.get_transform();
        atlasTop.SetParent(buttonEffectTop);
        val2.SetActive(false);
        UIButtonEffect.CacheShaderPropertyId();
        enableShadow = false;
    }