Пример #1
0
    void Start()
    {
        offset = transform.position - player.transform.position;

        Water       = GameObject.Find("WaterTrigger");
        WaterScript = Water.GetComponent <WaterTrigger>();
    }
Пример #2
0
    //--------------------------------------------------------
    public void Execute()
    {
        GameObject go = GameObject.Instantiate(gameObject);

        go.SetActive(false);
        go.transform.Translate(Vector3.up * offset);
        go.name = "basket"; // to prevent multiple suffix "Clone"

        WaterTrigger wt = go.GetComponentInChildren <WaterTrigger>();

        if (wt != null)
        {
            wt.DisableObjects();
        }

        go.SetActive(true);
    }
Пример #3
0
    private void Start()
    {
        _canvas        = GameObject.Find("Canvas").GetComponent <Canvas>();
        _canvasScaler  = GameObject.Find("Canvas").GetComponent <CanvasScaler>();
        _player        = FindObjectOfType <NewPlayer>();
        _gammie        = FindObjectOfType <Gammie>();
        _water         = FindObjectOfType <WaterTrigger>();
        _endTrigger    = FindObjectOfType <EndTrigger>();
        _tutorialRage  = FindObjectOfType <TutorialRage>();
        _bjornActivate = FindObjectOfType <BjornArmActivate>();

        _eventManager = EventManager.Instance != null ? EventManager.Instance : FindObjectOfType <EventManager>();
        if (_eventManager == null)
        {
            Debug.Log("Event Manager is NULL");
        }
    }
Пример #4
0
 public virtual void OnEnterWater(WaterTrigger source)
 {
     // By default, do nothing
 }