public ResourceDefinition(string treePath, string nodePath)
 {
     if ((treePath != null) && (nodePath != null))
     {
         _nodeRef              = NodeReference.Get <T>(treePath, nodePath);
         Text                  = _nodeRef.Name;
         _nodeRef.DataChanged += OnChanged;
     }
 }
예제 #2
0
        public CostumeDefinition(CharacterDefinition character, int index) :
            base(index == -1 ? null : "system\\common5.pac", index == -1 ? null : String.Format("sc_selcharacter_en/char_bust_tex_lz77/Type1[{0}]/Textures(NW4R)/MenSelchrFaceB.{1:000}", character.CharacterIndex, character.PortraitId + index))
        {
            _character     = character;
            _index         = index;
            _portraitIndex = index == -1 ? -1 : _character.PortraitId + _index;
            _path          = _character.GetCostumePath(index);

            if (_nodeRef != null)
            {
                _nodeRef.Watches.Add(NodeReference.Get <TextureReference>(String.Format("menu\\common\\char_bust_tex\\MenSelchrFaceB{0:000}.brres", _character.CharacterIndex * 10), String.Format("Textures(NW4R)/MenSelchrFaceB.{0:000}", _character.PortraitId + _index)));
            }
        }
 private CharacterDefinition(string name, string fitName, int index, int costumeCount)
     : base(index == -1 ? null : "system\\common5.pac", index == -1 ? null : String.Format("sc_selcharacter_en/Type1[70]/Textures(NW4R)/MenSelchrChrFace.{0:000}", index + 1))
 {
     Text          = name;
     _fitName      = fitName;
     _index        = index;
     _costumeCount = costumeCount;
     if (index != -1)
     {
         _charNameRef              = NodeReference.Get <TextureReference>("system\\common5.pac", String.Format("sc_selcharacter_en/Type1[70]/Textures(NW4R)/MenSelchrChrNmS.{0:000}", index + 1));
         _charNameRef.DataChanged += OnChanged;
     }
 }