public override void Excute(FSM fsm)
	{
		// no thing to do...
		var boss = fsm.Blackboard.GetData<Boss>("Boss");
		Debug.Log(string.Format("Boss's state : {0}", boss));
		Debug.Log(string.Format("Boss can catch me ? : {0}", boss.speed > fsm.GetParamValue<int>(TestFSM.P_SPEED)));
	}
	// Use this for initialization
	void Start () 
	{
//		Console.ForegroundColor = ConsoleColor.Green;
		
		fsm = new FSM("Jave's FSM");
		
		Debug.Log(string.Format("Start testing :{0}", fsm));
		
		// add event show cur state changed info
		fsm.CurStateChangedEvent += (CurStateChangedEventHandler)((sender) =>
		                                                          {
			Debug.Log(string.Format("state changed, last : {0}, cur : {1}", fsm.LastState, fsm.CurState));
		});
		// add event show params changed info
		fsm.ParamsChangedEvent += (ParamsChangedEventHandler)((sender, paramChangedArgs) =>
		                                                      {
			//Debug.Log(string.Format(
			//    "param:{1}, src:{2}, to: {3}",
			//    fsm, paramChangedArgs.CurValue.Name, paramChangedArgs.LastValue.Value, paramChangedArgs.CurValue.Value));
		});
		
		// add some states
		fsm.AddState(new MyIdle(IDLE));
		fsm.AddState(new MyRun(RUN));
		fsm.AddState(new MyFly(FLY));
		fsm.AddState(new MyDead(DEAD));
		// set any state
		fsm.AnyState = new MyAnyState("any state");
		// set cur state
		fsm.CurState = fsm.GetState(IDLE);
		
		// add some into fsm black board, u can add anythings for every states to calcs
		fsm.Blackboard.AddData("Boss", new Boss());
		
		// add fsm some params
		fsm.AddParam(new ParamFunc(P_GRAVITY_FUNC_1, (FuncParamHandler)(funcArgs => // Param can be a func, handl complex logic
		                                                                {
			return fsm.GetParamValue<int>(P_SPEED) > 15 && fsm.GetParamValue<int>(P_HP) > 0 && fsm.GetParamValue<int>(P_GRAVITY) <= 0;
		})));
		
		fsm.AddParam(new ParamFunc(P_GRAVITY_FUNC_2, (FuncParamHandler)(funcArgs => // Param can be a func, handl complex logic
		                                                                {
			return fsm.GetParamValue<int>(P_SPEED) < 15 && fsm.GetParamValue<int>(P_HP) > 0;
		})));
		
		fsm.AddParam(new ParamValue(P_GRAVITY) { Value = 10 });              // init gravity = 10;
		fsm.AddParam(new ParamBoolean(P_GRAVITY_ENABLED) { Value = true });  // init gravity_enabled = true
		fsm.AddParam(new ParamValue(P_SPEED) { Value = 0 });                 // init speed = 0;
		fsm.AddParam(new ParamValue(P_HP) { Value = 100 });                  // init hp = 100
		
		// idle state add some transition to run
		FSM.TransitionTo(fsm, IDLE, RUN, new List<Condition>() { COND_GE_10_SPEED, COND_ALIVE_HP });
		// run back to idle
		FSM.TransitionTo(fsm, RUN, IDLE, new List<Condition>() { COND_L_10_SPEED, COND_ALIVE_HP });
		// run to fly
		FSM.TransitionTo(fsm, RUN, FLY, new List<Condition>() { COND_GRAVITY_FUNC_1 });
		// back to run
		FSM.TransitionTo(fsm, FLY, RUN, new List<Condition>() { COND_GRAVITY_FUNC_2, COND_E_TRUE_GRAVITY_ENABLE });
		// every state to fly, except dead
		ToFly(fsm, IDLE); ToFly(fsm, RUN);
		// idle, run, fly, and so on, states add some transition to dead state's transitions.
		ToDead(fsm, IDLE); ToDead(fsm, RUN); ToDead(fsm, FLY);
		// dead back to alive(idle)
		FSM.TransitionTo(fsm, DEAD, IDLE, new List<Condition>() { COND_ALIVE_HP });
		
		// dummy fsm update task
//		DummyFsmUpdate(fsm);
		
		Console.ReadLine();
	}
	static void DummyFsmUpdate(FSM fsm)
	{
		//const int updatePerMs = (int)(1f / 60f * 1000);
		const int updatePerMs = (int)(1000);
		
		bool speedAdding = true;
		bool gravityAdding = false;
		bool hpAdding = false;
		
		int perNumGravityEnabled = 5;
		int gravityNum = 0;
		
		//		var task = Task.Factory.StartNew((Action)(() =>
		
//		while (true)
//		{
			fsm.Update();
			
			var speed = fsm.GetParamValue<int>(P_SPEED);
			var hp = fsm.GetParamValue<int>(P_HP);
			var gravity = fsm.GetParamValue<int>(P_GRAVITY);
			
			if (hp <= -5) hpAdding = true;
			else if (hp > 100) hpAdding = false;
			hp += (hpAdding ? 4 : -4);
			
			fsm.SetParamValue(P_HP, hp); // minus 10 hp per frame, to dead when hp less and equals 0
			
			if (hp > 0) // is alive, then to do somthing...
			{
				if (speed <= 0) speedAdding = true;
				else if (speed > 20) speedAdding = false;
				fsm.SetParamValue(P_SPEED, (speed + (speedAdding ? 1 : -1))); // to run when speed greater and equals 10, back to idle when speed less than 10
				
				if (gravity <= -10) gravityAdding = true;
				else if (gravity > 10)  gravityAdding = false;
				fsm.SetParamValue(P_GRAVITY, (gravity + (gravityAdding ? 1 : -1))); // to fly when gravity less and equals 0
				
				gravityNum += 1;
				if (gravityNum % perNumGravityEnabled == 0)
				{
					fsm.SetParamValue(P_GRAVITY_ENABLED, !fsm.GetParamValue<bool>(P_GRAVITY_ENABLED));
				}
			}
//			Thread.Sleep(updatePerMs);
//		}
	}