﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Verse;

namespace Rimworld_Animations
{
    public class ExtendedAnimatorAnchor_Thing : BaseExtendedAnimatorAnchor
    {

        private Thing thing;

        public ExtendedAnimatorAnchor_Thing() : base() { }

        public ExtendedAnimatorAnchor_Thing(Thing thing) : base()
        {
            this.thing = thing;
        }

        public override Vector3 getDrawPos()
        {
            //x and z position, regular altitude for pawns
            return new Vector3(thing.DrawPos.x, AltitudeLayer.Pawn.AltitudeFor(), thing.DrawPos.z);
        }

        public override void ExposeData()
        {
            base.ExposeData();
            Scribe_References.Look<Thing>(ref this.thing, "animations_anchor_thing", false);
        }
    }
}
