using UnityEngine;
using System.Collections;
using Framework.Entities;
using Framework.InteractionSystem;

public class Start : CoreAction
{
    public string name;

    public Start(CoreBehaviour sender, string name) : base(sender)
    {
        this.name = name;
    }
}

[AddComponentMenu("Scripts/Framework/Component Test")]
public class ComponentTest : CoreBehaviour 
{
    // Use this for initialization
    protected override void InnerAwake()
    {
        AddActionHandler<Start>(ReceiveStartedAction);
    }

	// Use this for initialization
	protected override void InnerStart () 
    {
        SelfInteract(new Start(this, this.name)); 
	}
	
	// Update is called once per frame
    protected override void InnerUpdate()
    {

    }

    protected new void Log(string message)
    {
        Debug.Log(message);
    }

    private void ReceiveStartedAction(Start started)
    {
        Log("Recevied started action.");
    }
}
