public UnitAnimation(UnitContent unitContent) { this.unitContent = unitContent; this.Texture = unitContent.Texture; this.Size = unitContent.Size; }
public Unit(UnitContent unitContent) { this.Data = unitContent.Data; AIData = new UnitAIData(this); AIData.npcData = NPCData.loadNPCData(Constants.Path.NPCData + Data["npcdata"]); CurrentStats.Add("health", int.Parse(Data["health"], CultureInfo.InvariantCulture)); CurrentStats.Add("visionrange", 500); animation = new UnitAnimation(unitContent); FacingVector = new Vector2(0, 1); lastFacingVector = FacingVector; }