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

public class HubControl : MonoBehaviour
{

    //these are for IDing the destination hubs from each direction
    public GameObject nDestinationH = null, sDestinationH = null, eDestinationH = null, wDestinationH = null;


    //these are for IDing the connected path objects, their color & if they have been destroyed or not
    public GameObject nPathH = null, sPathH = null, ePathH = null, wPathH = null;
    bool nPathDead = false, sPathDead = false, ePathDead = false, wPathDead = false;


    //these are for the hub value based on the material applied
    Renderer rend;
    public Material matchMaterial;
    public Material hub0, hub10, hub20, hub50, hub100;
    public int currentHubValue;

    void Start ()
    {
        rend = GetComponent<Renderer>();
        rend.sharedMaterial = matchMaterial;

        if (matchMaterial == hub0)
        {
            currentHubValue = 0;
        }
        else if (matchMaterial == hub10)
        {
            currentHubValue = 10;
        }
        else if (matchMaterial == hub20)
        {
            currentHubValue = 20;
            //Debug.Log(this.name + " is valued at: " + currentHubValue);
        }
        else if (matchMaterial == hub50)
        {
            currentHubValue = 50;
        }
        else if (matchMaterial == hub100)
        {
            currentHubValue = 100;
            //Debug.Log(this.name + " is valued at: " + currentHubValue);
        }
    }
	
	// Update is called once per frame
	void Update ()
    {
       // Debug.Log(this.name + " is valued at: " + currentHubValue);
	}
}
