Esempio n. 1
0
    public IEnumerator RepairGrave()
    {
        if (this.currentGraveEvent != null)
        {
            if (this.currentGraveEvent.toolToFix == ToolsManager.instance.selectedTool.GetToolType())
            {
                graveState = GraveState.Fixing;
                //wait for repaier
                graveTimer.SetActive(true);
                startClock = true;
                waitTime   = 3 * graveStatus;
                ToolsManager.instance.usingTool = true;
                yield return(new WaitForSeconds(waitTime));

                //repair
                graveStatus = 0;
                //ToolsManager.instance.ClearSelectedTool();
                graveTimer.SetActive(false);
                startClock = false;
                ToolsManager.instance.usingTool = false;
                ResetGrave();
                print("grave reparada para o status" + graveStatus);
            }
            else
            {
                print("wrong tool");
            }
        }
    }
Esempio n. 2
0
 public void StopGraveEvent()
 {
     graveState = GraveState.Idle;
 }
Esempio n. 3
0
 public void SetGraveEvent(Event _currentEvent)
 {
     currentGraveEvent = _currentEvent;
     graveState        = GraveState.Event;
     currentGraveEvent.SetEventGrave(this);
 }
Esempio n. 4
0
 public void ResetGrave()
 {
     graveStatus = 0;
     graveState  = GraveState.Idle;
     ResetGraveSprite();
 }
 void Start()
 {
     currentState   = GraveState.state_empty;
     currentTask    = null;
     graveUIManager = QNDPlayer.player.GetComponent <QNDGraveManager>();
 }