using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Assets.Scripts.Network
{
    public class House : WorldObject
    {
        public UnityEngine.Color Color = UnityEngine.Color.white;

        public House() : base()
        {
            Type = WorldObjectType.wotHouse;
            Energy.DrainRate = WorldConfig.HouseDischargeRate;
        }

        public int Owner;
        public float PlayerDetectRangeSqr = 50.0f;
        public DrainableResource Energy = new DrainableResource();

        public bool IsMine()
        {
            return Owner == World.MyID;
        }

        public override void UpdateAssignedObject(float FrameTime)
        {
            base.UpdateAssignedObject(FrameTime);
            Energy.Update(FrameTime);
        }
    }
}
