예제 #1
0
            /// <summary>
            /// overridden copy constructor
            /// </summary>
            /// <param name="node">node to cpy</param>
            /// <param name="position">position to copy to</param>
            public override void Copy(BaseNode node, Vector2 position)
            {
                base.Copy(node, position);

                CharacterScaleNode characterScaleNode = node as CharacterScaleNode;

                // copy all relevant variables, character, scale, lerp etc.
                m_character = characterScaleNode.m_character;
                m_scale     = characterScaleNode.m_scale;
                m_isLerp    = characterScaleNode.m_isLerp;
                m_lerpTime  = characterScaleNode.m_lerpTime;
            }
예제 #2
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="characterTransformer"></param>
            private void ScaleCharacter(CharacterTransformer characterTransformer)
            {
                CharacterScaleNode scaleNode = m_currentNode as CharacterScaleNode;
                GameObject         character = m_characterManager.TryGetCharacter(scaleNode.GetCharacter());
                Vector2            scale     = scaleNode.GetScale();

                if (scaleNode.GetIsLerp())
                {
                    m_sceneManager.StartCoroutine(characterTransformer.LerpCharacterScale(character, scale, scaleNode.GetLerpTime()));
                }
                else
                {
                    characterTransformer.SetCharacterScale(character, scale);
                }

                m_sceneManager.NextNode();
            }