Ejemplo n.º 1
0
        public void OnNextColor(TextureType[] types)
        {
            if (!IsReady)
            {
                return;
            }

            AbstractTexture mainTexture = null;

            for (int i = 0; i < types.Length; i++)
            {
                if (!currentCharacterTextures.ContainsKey(types[i]))
                {
                    continue;
                }

                if (mainTexture == null)
                {
                    mainTexture = currentCharacterTextures[types[i]];
                    mainTexture.MoveNextColor();
                }
                else
                {
                    currentCharacterTextures[types[i]].SelectedColor = mainTexture.SelectedColor;
                }
            }

            OnChangeTexture(types);
        }
Ejemplo n.º 2
0
        public void OnPrevTexture(TextureType[] types, TextureType[] clearTypes = null)
        {
            if (!IsReady)
            {
                return;
            }

            AbstractTexture mainTexture = null;

            for (int i = 0; i < types.Length; i++)
            {
                if (!currentCharacterTextures.ContainsKey(types[i]))
                {
                    continue;
                }

                if (mainTexture == null)
                {
                    mainTexture = currentCharacterTextures[types[i]];
                    mainTexture.MovePrev();
                }
                else
                {
                    currentCharacterTextures[types[i]].SelectedTexture = mainTexture.SelectedTexture;
                }
            }

            ResetTexture(clearTypes);
            OnChangeTexture(types);
        }