using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;

namespace KinPortal {
	public class InterruptorObject : DynamicObject {
		public CollisionStrategy CollisionStrategy {get; private set;}

		public InterruptorObject(string filepath, Vector3 pos, Quaternion rot, Scene scene, ShapeType shapeType, bool isStatic, TargetingStrategy tstrategy, CollisionStrategy cstrategy)
				: base(filepath, pos, rot, scene, shapeType, isStatic, tstrategy) {
			CollisionStrategy = cstrategy;
		}

		public InterruptorObject(string filepath, Scene scene, ShapeType shapeType)
				: this(filepath, Vector3.Zero, Quaternion.Identity, scene, shapeType, false, new NoTargetingStrategy(), new NoCollisionStrategy()) {}

		public void Collision(DynamicObject obj) {
			CollisionStrategy.Collision(this, obj);
		}

		public override void Update(GameTime gameTime) {
			CollisionStrategy.Update(this, gameTime);
			base.Update(gameTime);
		}
	}
}
