public CharacterSkin(ICharacterBasisParameter basisparam) { Spritepath = basisparam.SpritePath; Animatorpath = basisparam.AnimatorControllerPath; //Debug.Log(parent + Animatorpath); AnimatorController = Animatorpath.Length == 0 ? null : Resources.Load<AnimatorOverrideController>(parent + Animatorpath); Sprite = GameSkins.getCharecterSprite(basisparam)[1]; }
public CharacterParameterBasis(ICharacterBasisParameter basisparam) : base(basisparam) { BasisParameter = basisparam; CurrentBuffs = new List<StatusBuffBasis>(); Offset = new ParameterOffset(); Inventory = new ItemInventory(basisparam.InventorySize); CurrentExp = 0; CurrentActionSpeed = BasisParameter.ActionSpeed; CurrentLevel = 1; MaxHP = basisparam.InitHP; CurrentHP = MaxHP; WallPenatrableThrow = false; MaxSTR = basisparam.STR; CurrentSTR = MaxSTR; Skin = new CharacterSkin(this.BasisParameter);//(basisparam.SpritePath, basisparam.AnimatorControllerPath); if(TalkTextPath.Length!=0)TalkText = TalkXMLReder.loadXML(TalkTextPath); }
public static Sprite[] getCharecterSprite(ICharacterBasisParameter param) { var charactername = param.OriginalName; if (LoadedCharacterSprites.ContainsKey(charactername)) return LoadedCharacterSprites[charactername]; var load = Resources.LoadAll<Sprite>(GeneralCharacterPath+param.SpritePath); LoadedCharacterSprites.Add(charactername, load); return load; }