コード例 #1
0
        /// <summary>
        /// Apply the skin to the turret.
        /// </summary>
        public void ApplyTurretSkin()
        {
            turret.ClearMeshSkins();

            Texture2D skinTexture       = Toolkit.GetSkin(attributes.skin);
            const int ARBITRARY_CEILING = 2000;

            for (int i = 0; i < ARBITRARY_CEILING; ++i)
            {
                if (!turret.AddMeshSkin("Body" + i, skinTexture))
                {
                    break;
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Apply the skin to the tank.
        /// </summary>
        private void ApplySkin()
        {
            selectedTank.ClearMeshSkins();
            selectedTurret.ClearMeshSkins();

            Texture2D skinTexture       = Toolkit.GetSkin(form.TankSkin);
            const int ARBITRARY_CEILING = 2000;

            for (int i = 0; i < ARBITRARY_CEILING; ++i)
            {
                if (!selectedTank.AddMeshSkin("Body" + i, skinTexture))
                {
                    break;
                }
            }

            for (int i = 0; i < ARBITRARY_CEILING; ++i)
            {
                if (!selectedTurret.AddMeshSkin("Body" + i, skinTexture))
                {
                    break;
                }
            }
        }