summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XOpenNestUI.cs
blob: 5a0b69a4f18155e6ce5c4ab601adee9b190ce37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using UnityEngine;
using System.Collections;
using XUtliPoolLib;

public class XOpenNestUI : MonoBehaviour {

    private IXPlayerAction _uiOperation;

    void OnTriggerEnter(Collider c)
    {
        if (c.gameObject.CompareTag("Player"))
        {
            if (_uiOperation == null || _uiOperation.Deprecated)
                _uiOperation = XInterfaceMgr.singleton.GetInterface<IXPlayerAction>(1);

            if (_uiOperation != null) _uiOperation.GotoNest();
        }
    }
}