コード例 #1
0
        public override void CopyFrom <T>(T other)
        {
            SelectableTemplate otherTemplate = null;

            if (other.GetType() == typeof(SelectableTemplate))
            {
                otherTemplate = other as SelectableTemplate;
            }

            Selectable otherSelectable = null;

            if (other.GetType() == typeof(Selectable))
            {
                otherSelectable = other as Selectable;
            }


            if (otherSelectable == null && otherTemplate == null)
            {
                return;
            }

            if (otherSelectable != null)
            {
                CopyFrom(otherSelectable);
            }

            if (otherTemplate != null)
            {
                CopyFrom(otherTemplate);
            }
        }
コード例 #2
0
        public void CopyFrom(SelectableTemplate other)
        {
            transition.value  = other.transition.value;
            colorBlock.value  = other.colorBlock.value;
            spriteState.value = other.spriteState.value;

            transition.apply  = other.transition.apply;
            colorBlock.apply  = other.colorBlock.apply;
            spriteState.apply = other.spriteState.apply;
        }