コード例 #1
0
 protected override void Awake()
 {
     base.Awake();
     CurrentLetter           = (char)Random.Range(65, 90);
     currentTextElement.text = CurrentLetter.ToString();
     animator = GetComponent <EasyTween>();
 }
コード例 #2
0
ファイル: BagPanel.cs プロジェクト: etonix/UnityMMORPG
    public override void ShowMe()
    {
        base.ShowMe();

        anim = GetComponent <EasyTween>();
        anim.OpenCloseObjectAnimation();

        for (int i = 0; i < pageViews.Length; i++)
        {
            pageTgles[i].Init(pageViews[i]);
        }

        pageTgles[0].TurnOn();

        quitBtn = GetComponent <Button>("QuitBtn");
        quitBtn.onClick.AddListener(() =>
        {
            UIManager.Instance.HidePanel(typeof(BagPanel));
        });

        for (int i = 0; i < equips.Length; i++)
        {
            int itemID = EquipManager.Instance.GetEquipments()[i];

            if (itemID != 0)
            {
                ItemDefine define = DataManager.Instance.Items[itemID];

                equips[i].gameObject.SetActive(true);
                equips[i].Init(define);
            }
        }
    }
コード例 #3
0
ファイル: CreateAnimImage.cs プロジェクト: ifpi98/ProjectSM
    private void UpdatePanels2()
    {
        //Vector3 InstancePosition2 = EndAnim;

        //totalWidth = 0f;

        for (int i = lastCharCount; i < HowManyButtons2; i++)
        {
            charUnitObjects[i].gameObject.SetActive(true);

            // Creates Instance
            //GameObject unit = Instantiate(unitPrefab.gameObject) as GameObject;
            //unit.name = "CharDegreeList" + i;
            // Changes the Parent, Assing to scroll List
            charUnitObjects[i].transform.SetParent(RootRect, false);
            EasyTween easy = charUnitObjects[i].GetComponent <EasyTween>();
            // Add Tween To List
            Created.Add(easy);
            // Final Position
            StartAnim.y = InstancePosition2.y;
            // Pass the positions to the Tween system
            easy.SetAnimationPosition(StartAnim, InstancePosition2, EnterAnim, ExitAnim);
            // Intro fade
            easy.SetFade();
            // Execute Animation
            easy.OpenCloseObjectAnimation();
            // Increases the Y offset
            InstancePosition2.y += Offset;

            totalWidth += Offset;
        }

        lastCharCount = HowManyButtons2;
    }
コード例 #4
0
 private void Start()
 {
     star           = transform.Find("star").gameObject;
     TweenToControl = star.GetComponent <EasyTween>();
     shiny          = transform.Find("shiny").gameObject;
     HideStar();
 }
コード例 #5
0
ファイル: CreateAnimImage.cs プロジェクト: ifpi98/ProjectSM
    public void UpdatePanels()
    {
        for (int i = lastUnitCount; i < HowManyButtons; i++)
        {
            unitObjects[i].gameObject.SetActive(true);

            // Changes the Parent, Assing to scroll List
            unitObjects[i].transform.SetParent(RootRect, false);
            EasyTween easy = unitObjects[i].GetComponent <EasyTween>();
            // Add Tween To List
            Created.Add(easy);
            // Final Position
            StartAnim.y = InstancePosition.y;
            // Pass the positions to the Tween system
            easy.SetAnimationPosition(StartAnim, InstancePosition, EnterAnim, ExitAnim);
            // Intro fade
            easy.SetFade();
            // Execute Animation
            easy.OpenCloseObjectAnimation();
            // Increases the Y offset
            InstancePosition.y += Offset;

            totalWidth += Offset;
        }
        lastUnitCount = HowManyButtons;
    }
コード例 #6
0
    public void Init()
    {
        // if object hs button for screen navigation
        IUIScreenNavigationController[] uiNavigationControllerArray = gameObject.GetComponentsInChildren <IUIScreenNavigationController>();
        for (int i = 0; i < uiNavigationControllerArray.Length; i++)
        {
            uiNavigationControllerArray[i].Source = gameObject;
        }

        _tween = gameObject.GetComponent <EasyTween>();
        if (_tween == null)
        {
            if (_animetionSettings.uiMenuAnimationType != EnumUIMenuAnimationType.withOut)
            {
                _tween = gameObject.AddComponent <EasyTween>();
            }
        }
        _currentRectTransform = gameObject.GetComponent <RectTransform>();
        if (_tween != null)
        {
            _tween.rectTransform = _currentRectTransform;
            //_tween.ResetAnimationParts(false, false, false, UITween.AnimationParts.EndTweenClose.DEACTIVATE);
            SetAnimationSettings();
            SetStartStrrings();
        }
        Hide();
    }
コード例 #7
0
    private void CreatePanels()
    {
        Vector3 InstancePosition = EndAnim;

        totalWidth = 0f;

        for (int i = 0; i < HowManyButtons; i++)
        {
            // Creates Instance
            GameObject createInstance = Instantiate(CreateInstance) as GameObject;
            // Changes the Parent, Assing to scroll List
            createInstance.transform.SetParent(RootRect, false);
            EasyTween easy = createInstance.GetComponent <EasyTween>();
            // Add Tween To List
            Created.Add(easy);
            // Final Position
            StartAnim.y = InstancePosition.y;
            // Pass the positions to the Tween system
            easy.SetAnimationPosition(StartAnim, InstancePosition, EnterAnim, ExitAnim);
            // Intro fade
            easy.SetFade();
            // Execute Animation
            easy.OpenCloseObjectAnimation();
            // Increases the Y offset
            InstancePosition.y += Offset;

            totalWidth += Offset;
        }
    }
コード例 #8
0
 // Use this for initialization
 void Start()
 {
     //TwitterShareButton = GameObject.Find("TwitterShareButton").GetComponent<Button>();
     easyTweenPostTwitPopUp    = GameObject.Find("PopUpButtonAnim").GetComponent <EasyTween>();
     easyTweenTwitterAuthPopUp = GameObject.Find("TwitterAuthAnim").GetComponent <EasyTween>();
     pinNumber  = GameObject.Find("PinNumber").GetComponent <Text>();
     moiTwitter = GameObject.Find("TwitterObj").GetComponent <MOITwitter>();
 }
コード例 #9
0
ファイル: ShopPanel.cs プロジェクト: etonix/UnityMMORPG
    public void Init(int id)
    {
        shopID        = id;
        selectedIndex = -1;

        anim = GetComponent <EasyTween>();

        anim.OpenCloseObjectAnimation();

        InitShopItems();

        quitBtn = GetComponent <Button>("QuitBtn");
        quitBtn.onClick.AddListener(() =>
        {
            UIManager.Instance.HidePanel(typeof(ShopPanel));
        });
    }
コード例 #10
0
ファイル: LoadingPanel.cs プロジェクト: etonix/UnityMMORPG
    //Methods
    #region Methods to initialize/finalize panel when called to show or hide
    public override void ShowMe()
    {
        base.ShowMe();

        //get slider bar component
        progressBar       = GetComponent <Slider>("progressSlider");
        progressBar.value = 0;
        //get progress text component
        progressTxt = GetComponent <Text>("progressTxt");

        mAnim = GetComponent <EasyTween>();

        //add event listener of current loading status
        //EventCenter.Instance.AddEventListener<float>("loading update", LoadingUpdate);
        EventCenter.Instance.AddEventListener("start loading simulation", StartSimulation);

        mSimulation = true;
    }
コード例 #11
0
    private void Start()
    {
        if (_nextUIScreenTween == null)
        {
            _nextUIScreenTween = gameObject.AddComponent <EasyTween>();
            _nextUIScreenTween.ResetAnimationParts();
        }

        if (_currentUIScreenTween == null)
        {
            _currentUIScreenTween = gameObject.AddComponent <EasyTween>();
            _currentUIScreenTween.ResetAnimationParts();
        }
        if (_display == null)
        {
            _display = GameObject.FindGameObjectWithTag(TagNames.TAG_UI_SCREEN_CONTAINER).GetComponent <RectTransform>();
        }
    }
コード例 #12
0
    // Token: 0x0600886C RID: 34924 RVA: 0x002FE8F0 File Offset: 0x002FCAF0
    private void LECIPLOGNEA()
    {
        Vector3 endAnim = this.EndAnim;

        this.GDDJIOHEJGI = 1094f;
        for (int i = 1; i < this.HowManyButtons; i++)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.CreateInstance);
            gameObject.transform.SetParent(this.RootRect, false);
            EasyTween component = gameObject.GetComponent <EasyTween>();
            this.ABIMNKKBBKF.Add(component);
            this.StartAnim.y = endAnim.y;
            component.SetAnimationPosition(this.StartAnim, endAnim, this.EnterAnim, this.ExitAnim);
            component.SetFade();
            component.NIOMFNEEMDF();
            endAnim.y        += this.Offset;
            this.GDDJIOHEJGI += this.Offset;
        }
    }
コード例 #13
0
    // Token: 0x06008859 RID: 34905 RVA: 0x002FE324 File Offset: 0x002FC524
    private void CAFEAOBPKGJ()
    {
        Vector3 endAnim = this.EndAnim;

        this.GDDJIOHEJGI = 402f;
        for (int i = 0; i < this.HowManyButtons; i += 0)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.CreateInstance);
            gameObject.transform.SetParent(this.RootRect, false);
            EasyTween component = gameObject.GetComponent <EasyTween>();
            this.ABIMNKKBBKF.Add(component);
            this.StartAnim.y = endAnim.y;
            component.SetAnimationPosition(this.StartAnim, endAnim, this.EnterAnim, this.ExitAnim);
            component.SetFade();
            component.OpenCloseObjectAnimation();
            endAnim.y        += this.Offset;
            this.GDDJIOHEJGI += this.Offset;
        }
    }
コード例 #14
0
ファイル: Game.cs プロジェクト: ifpi98/ProjectSM
    // Use this for initialization
    void Start()
    {
        //Screen.SetResolution(Screen.width* 16 / 9, Screen.width , false);
        //Screen.SetResolution(960, 720, false);
        //Screen.SetResolution(1152, 648, false);


        DI                             = GameObject.Find("DataObj").GetComponent <DataIni>();
        mon                            = GameObject.Find("GameObj").GetComponent <Monster>();
        dAJ                            = GameObject.Find("DataObj").GetComponent <DataArrayJson>();
        moiTwitter                     = GameObject.Find("TwitterObj").GetComponent <MOITwitter>();
        easyTweenMadeSlotPopUp         = GameObject.Find("PopUpButtonAnim").GetComponent <EasyTween>();
        easyTweenLevelUpInfoPopUp      = GameObject.Find("LevelUpInfoAnim").GetComponent <EasyTween>();
        easyTweenUnitMakeHintInfoPopUp = GameObject.Find("UnitMakeHintInfoAnim").GetComponent <EasyTween>();
        madeSlotViewPort               = GameObject.Find("MadeSlotViewPort");
        madeSlotScrollbarVertical      = GameObject.Find("MadeSlotScrollbarVertical").GetComponent <Scrollbar>();
        madeSlotScrollbarVerticalValue = madeSlotScrollbarVertical.value;

        checkExp();

        charDearDegree   = new int[mon.charcount];
        charCardRank     = new int[mon.charcount];
        unitDebutHistory = new bool[mon.unitcount];

        ReadInIData();

        maxSkillPoint = level * 10 + 100;
        skillPoint    = 0;
        skillOnCheck  = new bool[5];

        WriteGameData();
        CheckMadeSlotCount();
        CheckCharDegreeList();

        PutCardInSlotAtFirst();
        AvailableChar();
        AvailableCharNow(level);

        levelUpCheck = false;
        secondcheck  = true;
        SlotCardMaKe();
    }
コード例 #15
0
ファイル: HUD.cs プロジェクト: ZeroWR/AerandyrGame
    // Start is called before the first frame update
    void Start()
    {
        this.DialogPanel.enabled = false;
        this.DialogText.text     = string.Empty;
        if (this.dialogPlayer == null)
        {
            this.dialogPlayer = this.gameObject.AddComponent <DialogPlayer>();
        }

        this.dialogPlayer.SectionStarted += this.SectionStarted;
        this.dialogPlayer.TextUpdated    += this.TextUpdated;
        if (this.DialogSpeakerName != null)
        {
            this.defaultSpeakerNameColor = this.DialogSpeakerName.color;
        }

        if (this.QuestPanel)
        {
            this.QuestPanel.enabled         = false;
            this.questPanelRectTransform    = this.QuestPanel.GetComponent <RectTransform>();
            this.originalQuestPanelPosition = this.questPanelRectTransform.anchoredPosition;
            this.questTween         = this.QuestPanel.GetComponent <EasyTween>();
            this.questTween.enabled = false;
        }

        if (this.CurrentQuestPanel)
        {
            this.CurrentQuestPanel.enabled = false;
            var objectivesPanel = this.CurrentQuestPanel.GetComponentsInChildren <Canvas>().SingleOrDefault(x => x.name == "ObjectivesPanel");
            if (objectivesPanel != null)
            {
                this.questObjectivesController = objectivesPanel.GetComponent <QuestObjectivesController>();
                if (this.questObjectivesController != null)
                {
                    this.questObjectivesController.Controller = this.Controller;
                }
            }
        }

        this.questAnimationDoneEvent.AddListener(new UnityAction(this.OnQuestAnimationDone));
    }
コード例 #16
0
    private void OnEnable()
    {
        StartCoroutine(Logo());
        PhotonNetwork.isMessageQueueRunning = true;
        pv                 = GetComponent <PhotonView>();
        easyTween          = GetComponent <EasyTween>();
        readyManager       = FindObjectOfType <ReadyManager>();
        dayNightController = GetComponent <DayNightController>();

        localCam    = readyManager.localCam;
        localPlayer = readyManager.localPlayer;
        localPlayer.GetComponent <JobManager>().enabled = true;
        thirdPersonUserControl = readyManager.thirdPersonUserControl;
        freeLookCam            = readyManager.freeLookCam;


        if (PhotonNetwork.player.IsMasterClient)
        {
            SetPlayerJob();
        }
    }
コード例 #17
0
ファイル: TweenRun.cs プロジェクト: Blueteak/GGJ2016
	// Use this for initialization
	void Start () 
	{

		et = GetComponent<EasyTween>();
		ResetTime = et.GetAnimationDuration();
	}
コード例 #18
0
 /// <summary>
 /// Awake is called when the script instance is being loaded.
 /// </summary>
 void Awake()
 {
     tween = GetComponent <EasyTween>();
 }
コード例 #19
0
 public void OnEnable()
 {
     tweenScript = ((EasyTween)target);
 }
コード例 #20
0
    //private CreateAnimImage createAnimImage0;
    //private CreateAnimImage createAnimImage1;

    // Use this for initialization
    void Start()
    {
        mon  = GameObject.Find("GameObj").GetComponent <Monster>();
        game = GameObject.Find("GameObj").GetComponent <Game>();
        DI   = GameObject.Find("DataObj").GetComponent <DataIni>();

        madeSlot = new GameObject[8];

        madeSlot[0] = GameObject.Find("Made Slot Button 0");
        madeSlot[1] = GameObject.Find("Made Slot Button 1");
        madeSlot[2] = GameObject.Find("Made Slot Button 2");
        madeSlot[3] = GameObject.Find("Made Slot Button 3");
        madeSlot[4] = GameObject.Find("Made Slot Button 4");
        madeSlot[5] = GameObject.Find("Made Slot Button 5");
        madeSlot[6] = GameObject.Find("Made Slot Button 6");
        madeSlot[7] = GameObject.Find("Made Slot Button 7");

        skillButtonObject = new GameObject[5];

        skillButtonObject[0] = GameObject.Find("Skill Button 0");
        skillButtonObject[1] = GameObject.Find("Skill Button 1");
        skillButtonObject[2] = GameObject.Find("Skill Button 2");
        skillButtonObject[3] = GameObject.Find("Skill Button 3");
        skillButtonObject[4] = GameObject.Find("Skill Button 4");

        finishWord = "";
        cardSlot   = new string[5];

        mButton  = new Button[5];
        mButText = new Text[5];

        mButton[0] = GameObject.Find("Member Button 0").GetComponent <Button>();
        mButton[1] = GameObject.Find("Member Button 1").GetComponent <Button>();
        mButton[2] = GameObject.Find("Member Button 2").GetComponent <Button>();
        mButton[3] = GameObject.Find("Member Button 3").GetComponent <Button>();
        mButton[4] = GameObject.Find("Member Button 4").GetComponent <Button>();

        for (int i = 0; i < 5; i++)
        {
            mButText[i] = mButton[i].GetComponentInChildren <Text>();
        }

        madeSlotButton     = new Button[8];
        madeSlotButtonText = new Text[8];

        for (int i = 0; i < 8; i++)
        {
            madeSlotButton[i]     = madeSlot[i].GetComponent <Button>();
            madeSlotButtonText[i] = madeSlotButton[i].GetComponentInChildren <Text>();
        }

        skillButton     = new Button[5];
        skillButtonText = new Text[5];

        for (int i = 0; i < 5; i++)
        {
            skillButton[i]     = skillButtonObject[i].GetComponent <Button>();
            skillButtonText[i] = skillButton[i].GetComponentInChildren <Text>();
        }

        skillPointText = GameObject.Find("SkillPointText").GetComponent <Text>();

        nTurnButton  = GameObject.Find("Next Turn Button").GetComponent <Button>();
        nTurnButText = nTurnButton.GetComponentInChildren <Text>();

        pointDisplay = GameObject.Find("Point Text").GetComponent <Text>();
        maxCombo     = GameObject.Find("Combo Text").GetComponent <Text>();

        RemainTurnText = new Text[5];

        RemainTurnText[0] = GameObject.Find("Remain Turn Text 0").GetComponent <Text>();
        RemainTurnText[1] = GameObject.Find("Remain Turn Text 1").GetComponent <Text>();
        RemainTurnText[2] = GameObject.Find("Remain Turn Text 2").GetComponent <Text>();
        RemainTurnText[3] = GameObject.Find("Remain Turn Text 3").GetComponent <Text>();
        RemainTurnText[4] = GameObject.Find("Remain Turn Text 4").GetComponent <Text>();

        popUpButtonMadeText = GameObject.Find("PopUpButtonMadeText").GetComponent <Text>();
        //madeSlotGetExpDPWriteBg = GameObject.Find("MadeSlotGetExpDPWriteBg").GetComponent<Button>();
        //madeSlotGetExpDPText = madeSlotGetExpDPWriteBg.GetComponentInChildren<Text>();
        //madeSlotGetSpDPWriteBg = GameObject.Find("MadeSlotGetSpDPWriteBg").GetComponent<Button>();
        //madeSlotGetSpDPText = madeSlotGetSpDPWriteBg.GetComponentInChildren<Text>();

        levelUpDPBg         = GameObject.Find("LevelUpDPBg").GetComponent <Button>();
        levelUpDPBgText     = levelUpDPBg.GetComponentInChildren <Text>();
        levelUpInfoDPBg     = GameObject.Find("LevelUpInfoDPBg").GetComponent <Button>();
        levelUpInfoDPBgText = levelUpInfoDPBg.GetComponentInChildren <Text>();

        unitMakeHintDPBg         = GameObject.Find("UnitMakeHintDPBg").GetComponent <Button>();
        unitMakeHintBgText       = unitMakeHintDPBg.GetComponentInChildren <Text>();
        unitMakeHintInfoDPBg     = GameObject.Find("UnitMakeHintInfoDPBg").GetComponent <Button>();
        unitMakeHintInfoDPBgText = unitMakeHintInfoDPBg.GetComponentInChildren <Text>();

        madeSlotHistoryPopUp             = GameObject.Find("MadeSlotInfoPopUp_CheckButt").GetComponent <Button>();
        madeSlotCountText                = madeSlotHistoryPopUp.GetComponentInChildren <Text>();
        madeSlotInfoPopUp_CheckButtAfter = GameObject.Find("MadeSlotInfoPopUp_CheckButtAfter").GetComponent <Button>();
        madeSlotInfoPopUp_CheckButtAfter.gameObject.SetActive(false);
        madeSlotAvailableUnit     = GameObject.Find("MadeSlotAvailableUnit").GetComponent <Button>();
        madeSlotAvailableUnitText = madeSlotAvailableUnit.GetComponentInChildren <Text>();

        createMadeSlotHistoryList = GameObject.Find("HistroyListCreateAnimImage").GetComponent <CreateAnimImage>();

        //historyDisplay = GameObject.Find("Make History Text").GetComponent<Text>();

        charDegreeInfoPopUp = GameObject.Find("CharDegreeInfoPopUp_CheckButt").GetComponent <Button>();
        charDegreeInfoPopUp_CheckButtAfter = GameObject.Find("CharDegreeInfoPopUp_CheckButtAfter").GetComponent <Button>();
        charDegreeInfoPopUp_CheckButtAfter.gameObject.SetActive(false);
        charDegreeAvailableChar     = GameObject.Find("CharDegreeAvailableChar").GetComponent <Button>();
        charDegreeAvailableCharText = charDegreeAvailableChar.GetComponentInChildren <Text>();

        createCharDegreeList = GameObject.Find("CharDegreeListCreateAnimImage").GetComponent <CreateAnimImage>();

        drawCardPopUp             = GameObject.Find("DrawCardPopUp_CheckButt").GetComponent <Button>();
        drawCardResultDP2Bg       = GameObject.Find("DrawCardResultDP2Bg").GetComponent <Button>();
        drawCardResultDP2Bg10     = GameObject.Find("DrawCardResultDP2Bg10").GetComponent <Button>();
        drawCardResultDP2BgText   = drawCardResultDP2Bg.GetComponentInChildren <Text>();
        drawCardResultDP2Bg10Text = drawCardResultDP2Bg10.GetComponentInChildren <Text>();

        settingPopUp_CheckButt = GameObject.Find("SettingPopUp_CheckButt").GetComponent <Button>();

        descriptionBg             = GameObject.Find("DescriptionBg").GetComponent <Button>();
        description2Bg            = GameObject.Find("Description2Bg").GetComponent <Button>();
        descriptionBgText         = descriptionBg.GetComponentInChildren <Text>();
        description2BgText        = description2Bg.GetComponentInChildren <Text>();
        easyTweenDescriptionPopUp = GameObject.Find("DescriptionPopUpAnim").GetComponent <EasyTween>();

        //drawCardPopUp_CheckButtAfter = GameObject.Find("DrawCardPopUp_CheckButtAfter").GetComponent<Button>();
        //drawCardPopUp_CheckButtAfter.gameObject.SetActive(false);

        easyTweenDrawCardResultPopUp   = GameObject.Find("DrawCardResultPopUpAnim").GetComponent <EasyTween>();
        easyTweenDrawCardResultPopUp10 = GameObject.Find("DrawCardResultPopUp10Anim").GetComponent <EasyTween>();
        easyTweenNotifyNoCreditPopUp   = GameObject.Find("NotifyNoCreditPopUpAnim").GetComponent <EasyTween>();

        //createAnimImage0 = FindObjectOfType<CreateAnimImage>();
        //createAnimImage1 = FindObjectOfType<CreateAnimImage>();
    }
コード例 #21
0
ファイル: EditorUITween.cs プロジェクト: natarian/Botcamp
 public void OnEnable()
 {
     tweenScript = ((EasyTween)target);
 }
コード例 #22
0
ファイル: Star.cs プロジェクト: shshwdr/The-Fall
 // Start is called before the first frame update
 void Start()
 {
     starCollectTarget = GameObject.Find("starCollectTarget").transform;
     starNumTween      = GameObject.Find("starNum").GetComponent <EasyTween>();
 }