using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class WallTurnRight : TileType {
    private string prefabName;

    public WallTurnRight(IEnumerable<ForceType> forceOn, IEnumerable<ForceType> forceOff, string prefabName) {
        SetForces(forceOn, forceOff);
        this.prefabName = prefabName;
    }

    public override string Prefab { get { return prefabName; } }

    public override void PawnEnters(PawnScript pawn) {
        pawn.Killed();
    }

    public override void PawnStartsTowards(PawnScript pawn) {
        //Debug.Log("Original direction: " + pawn.Direction);
        Vector2 newDirection = Quaternion.AngleAxis(-90, Vector3.forward) * pawn.Direction;
        pawn.Direction = newDirection;
        //Debug.Log("New direction: " + newDirection);
    }
}
