public void AnimateInNewHeroSkin(Actor actor)
    {
        GameObject       gameObject = actor.gameObject;
        AnimatedHeroSkin skin       = new AnimatedHeroSkin {
            Actor            = actor,
            GameObject       = gameObject,
            OriginalScale    = gameObject.transform.localScale,
            OriginalPosition = gameObject.transform.position
        };

        this.m_animData = skin;
        gameObject.transform.position   = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y + 0.5f, gameObject.transform.position.z);
        gameObject.transform.localScale = this.m_heroSkinContainer.transform.lossyScale;
        object[] args = new object[] {
            "from", 0f, "to", 1f, "time", 0.6f, "easetype", iTween.EaseType.easeOutCubic, "onupdate", "AnimateNewHeroSkinUpdate", "onupdatetarget", base.gameObject, "oncomplete", "AnimateNewHeroSkinFinished", "oncompleteparams", skin,
            "oncompletetarget", base.gameObject
        };
        Hashtable hashtable = iTween.Hash(args);

        iTween.ValueTo(gameObject, hashtable);
        CollectionHeroSkin component = actor.gameObject.GetComponent <CollectionHeroSkin>();

        if (component != null)
        {
            component.ShowSocketFX();
        }
    }
    private void ShowSocketFX()
    {
        CollectionHeroSkin component = this.m_heroSkinObject.GetComponent <CollectionHeroSkin>();

        if (component != null)
        {
            component.ShowSocketFX();
        }
    }
예제 #3
0
    public void UpdateVisual(bool isOverDeck)
    {
        Actor     activeActor = this.m_activeActor;
        SpellType nONE        = SpellType.NONE;

        if (this.m_visualType == CollectionManagerDisplay.ViewMode.CARDS)
        {
            if ((isOverDeck && (this.m_entityDef != null)) && !this.m_entityDef.IsHero())
            {
                this.m_activeActor = this.m_deckTile;
                nONE = SpellType.SUMMON_IN;
            }
            else
            {
                this.m_activeActor = this.m_cardActor;
                nONE = SpellType.DEATHREVERSE;
            }
        }
        else
        {
            this.m_activeActor = this.m_cardActor;
            nONE = SpellType.DEATHREVERSE;
        }
        if (activeActor != this.m_activeActor)
        {
            if (activeActor != null)
            {
                activeActor.Hide();
                activeActor.gameObject.SetActive(false);
            }
            if (this.m_activeActor != null)
            {
                this.m_activeActor.gameObject.SetActive(true);
                this.m_activeActor.Show();
                if ((this.m_visualType == CollectionManagerDisplay.ViewMode.CARD_BACKS) && (this.m_currentCardBack != null))
                {
                    CardBackManager.Get().UpdateCardBack(this.m_activeActor, this.m_currentCardBack);
                }
                Spell spell = this.m_activeActor.GetSpell(nONE);
                if (spell != null)
                {
                    spell.ActivateState(SpellStateType.BIRTH);
                }
                if ((this.m_entityDef != null) && this.m_entityDef.IsHero())
                {
                    CollectionHeroSkin component = this.m_activeActor.gameObject.GetComponent <CollectionHeroSkin>();
                    component.SetClass(this.m_entityDef.GetClass());
                    component.ShowSocketFX();
                }
            }
        }
    }