Example #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (!used)
        {
            trapAnim.Play(AnimName);
            used = true;
        }
        if (trapHighData.GetRealBoxCount() >= minNotKillHeigh)
        {
            trapSurface.enabled = false;
            return;
        }
        else
        {
            JoeCommandControl joeController = other.GetComponent<JoeCommandControl>();
            if (joeController)
            {
                joeController.HitTrap(timeInTheAir);
                Invoke("CanFall", timeInTheAir);
                trapAnim.Play();
                sa.KilledBySomething(resetTime + timeInTheAir);
            }

        }
    }
Example #2
0
    private void OnTriggerEnter(Collider other)
    {
        if (highData == null)
        {
            return;
        }
        if (highData.GetBoxCount() > 0)
        {
            return;
        }
        JoeCommandControl joeController = other.GetComponent <JoeCommandControl>();

        if (!joeController)
        {
            return;
        }
        sa.KilledBySomething(resetTime);
    }
Example #3
0
    private void CheckGameObjects()
    {
        //HighData check
        if (gemModel == null)
        {
            Debug.LogError("MapGenerator: gemModel is null!");
        }
        if (doorEdgeModel == null)
        {
            Debug.LogError("MapGenerator: doorEdgeModel is null!");
        }
        if (keyModel == null)
        {
            Debug.LogError("MapGenerator: keyModel is null!");
        }
        if (doorModel == null)
        {
            Debug.LogError("MapGenerator: doorModel is null!");
        }
        if (columnModel == null)
        {
            Debug.LogError("MapGenerator: columnModel is null!");
        }
        if (edgeModel == null)
        {
            Debug.LogError("MapGenerator: edgeModel is null!");
        }
        if (trapModel == null)
        {
            Debug.LogError("MapGenerator: trapModel is null!");
        }
        if (buttonModel == null)
        {
            Debug.LogError("MapGenerator: buttonModel is null!");
        }
        if (holeModel == null)
        {
            Debug.LogError("MapGenerator: holeModel is null!");
        }
        if (stoneLifterModel == null)
        {
            Debug.LogError("MapGenerator: stoneLifterModel is null!");
        }
        if (risingStoneModel == null)
        {
            Debug.LogError("MapGenerator: risingStoneModel is null!");
        }
        if (laserGateModel == null)
        {
            Debug.LogError("MapGenerator: laserGateModel is null!");
        }
        if (laserGateEdgeModel == null)
        {
            Debug.LogError("MapGenerator: laserGateModel is null!");
        }
        if (laserSwitchModel == null)
        {
            Debug.LogError("MapGenerator: laserSwitchModel is null!");
        }
        if (relicModel == null)
        {
            Debug.LogError("MapGenerator: relicModel is null!");
        }

        //Spec scripts
        if (boxModel == null)
        {
            Debug.LogError("MapGenerator: boxModel is null!");
            if (boxModel.gameObject.GetComponent <BoxCollider>() == null)
            {
                Debug.LogError("MapGenerator: boxModel must have a boxcollider!");
            }
        }
        if (laserGateModel.gameObject.GetComponent <LaserGate>() == null)
        {
            Debug.LogError("MapGenerator: laserGateModel has to have LaserGate script!");
        }
        if (risingStoneModel.gameObject.GetComponent <RiseElement>() == null)
        {
            Debug.LogError("MapGenerator: risingStoneModel has to have RiseElement script!");
        }
        if (doorModel.gameObject.GetComponent <Door>() == null)
        {
            Debug.LogError("MapGenerator: doorModel has to have Door script!");
        }
        JoeControl = Joe.GetComponent <JoeCommandControl>();
        if (JoeControl == null)
        {
            Debug.LogError("MapGenerator: Joe has to have JoeCommandControl!");
        }
    }