// Use this for initialization void Start() { stateList = Enum.GetValues(typeof(TLTutoF)).Cast <TLTutoF>().ToList(); nStates = stateList.Count; consumersFieldOfView = gameController.GetConsumersFieldOfView(); if (consumersFieldOfView == null) { Debug.Log("Generate fake 'consumerFieldOfView'"); consumersFieldOfView = GameTools.GenerateConsumersFieldOfView(); } delayForCommunicatingProgress = gameController.GetTimeBeforeRetryingDemand(); stateTuto = TLTutoF.Init; }
// ------------------------------------------------------------------------------- // public void UserChangePosition() { TLTutoF[] blockValidation = new TLTutoF[] { TLTutoF.Highlight, TLTutoF.HightlightWaitUser, TLTutoF.ChangePrice, TLTutoF.ChangePriceWaitUser, }; if (stateTuto == TLTutoF.ChangePositionWaitUser) { TutoNextStep(); } else if (blockValidation.Contains(stateTuto)) { // ignore } else { uiController.AuthorizeValidation(true); } }
public void SetState(TLTutoF value) { stateTuto = value; }
public bool IsState(TLTutoF value) { return(stateTuto == value); }
// ------------------------------------------------------------------------------- // public void End() { stateTuto = TLTutoF.End; }
// ------------------------------------------------------------------------------- // void TutoNextStep() { stateTuto += 1; uiController.SetProgress(ComputeProgress()); LogTutoState(); }