Esempio n. 1
0
    public void Finish()
    {
        _FryingStatus = FryingStatus.finish;
        t_time        = 0f;

        Transform  toolA   = GameManagement.ToolObjectParent.transform;
        ToolAction t_empty = null;

        foreach (Transform t in toolA)
        {
            ToolAction ta = t.GetComponent <ToolAction>();
            if (ta.UsageFor == Usage.placement)
            {
                if (t_empty == null && ta.tool.CheckGorengan() == null)
                {
                    t_empty = ta;
                }

                if (ta.tool.CheckGorengan() != null && ta.tool.CheckGorengan().ids == _friyingGorengan.ids)
                {
                    t_empty = ta;
                    break;
                }
            }
        }
        if (t_empty != null)
        {
            t_empty.tool.AddGorengan(_friyingGorengan);
        }

        _FryingStatus    = FryingStatus.empty;
        _friyingGorengan = null;
    }
Esempio n. 2
0
 public override void Use(Gorengan gorengan)
 {
     _FryingStatus    = FryingStatus.frying;
     _friyingGorengan = gorengan;
 }