internal void AddTask(ITaskable task) { if (stacked.Count != 0) { stacked.Last().OnLeave(); } stacked.Add(task); //task.Create(); task.OnEnter(); }