Exemplo n.º 1
0
    public override void OnObjectEnter(eObject obj)
    {
        base.OnObjectEnter(obj);

        if (obj.GetState("CollectableObject") > 0)
        {
            if (!objectList.Exists((eObject e) => e == obj ? true : false))
            {
                objectList.Add(obj);
            }
        }
        if (obj.GetState("autoCollect") > 0)
        {
            m_slime.TriggerEvent(obj, "pickUp");
        }
    }
Exemplo n.º 2
0
    public override void OnObjectStay(eObject obj)
    {
        base.OnObjectStay(obj);

        if (obj.GetState("player") > 0)
        {
            flag = true;
        }
    }
Exemplo n.º 3
0
    public override void OnObjectExit(eObject obj)
    {
        base.OnObjectExit(obj);

        if (obj.GetState("player") > 0)
        {
            TriggerEvent(obj, "exitTalker");
        }
    }
Exemplo n.º 4
0
    public override void OnObjectExit(eObject obj)
    {
        base.OnObjectExit(obj);

        if (obj.GetState("player") > 0)
        {
            TriggerEvent(m_bossObject, "playerExitPlatform " + m_platformNumber);
        }
    }
Exemplo n.º 5
0
    public override void OnObjectEnter(eObject obj)
    {
        base.OnObjectEnter(obj);

        if (obj.GetState("player") > 0)
        {
            TriggerEvent(this, "light");
        }
    }
Exemplo n.º 6
0
    public override void OnObjectEnter(eObject obj)
    {
        base.OnObjectEnter(obj);

        if (obj.GetState("player") > 0)
        {
            TransportTo(targetSceneName);
        }
    }
Exemplo n.º 7
0
    public override void OnObjectEnter(eObject obj)
    {
        base.OnObjectEnter(obj);

        if (obj.GetState("player") > 0)
        {
            Debug.Log("Player!");
            TriggerEvent(obj, "useCrystal");
        }
    }
Exemplo n.º 8
0
    public override void OnObjectEnter(eObject obj)
    {
        base.OnObjectEnter(obj);

        TriggerEvent(obj, "damageToEnemy 20 " + Toolbox.ToRawString(transform.parent.position));

        if (canHook && obj.GetState("hookPoint") > 0)
        {
            TriggerEvent(m_slime, "hook " + Toolbox.ToRawString(obj.transform.position));
        }
    }
Exemplo n.º 9
0
    public override void OnObjectExit(eObject obj)
    {
        base.OnObjectExit(obj);

        if (obj.GetState("CollectableObject") > 0)
        {
            if (objectList.Exists((eObject e) => e == obj ? true : false))
            {
                objectList.Remove(obj);
            }
        }
    }
Exemplo n.º 10
0
    public override void OnObjectEnter(eObject obj)
    {
        base.OnObjectEnter(obj);

        if (!activated)
        {
            if (obj.GetState(targetState) > 0)
            {
                TriggerEvent(targetObj, signal);
                activated = true;
            }
        }
    }
    public override void OnObjectStay(eObject obj)
    {
        base.OnObjectEnter(obj);

        if (obj.GetState("player") > 0)
        {
            //Damage player
            TriggerEvent(obj, "DmgSlow_GT");
        }
        if (obj.GetState("boss") > 0)
        {
            //Charge boss
            if (obj.GetState("Charge_GT") == 0)
            {
                RegisterEvent(obj, "Charge_GT");
            }
        }
        if (obj.GetState("GT_baco") > 0)
        {
            TriggerEvent(obj, "boom");
        }
    }
    public override void OnObjectEnter(eObject obj)
    {
        base.OnObjectEnter(obj);

        if (obj.GetState("player") > 0)
        {
            //Hit player
            TriggerEvent(obj, "damage 30 " + Toolbox.ToRawString(transform.position));
        }

        if (isStatic)
        {
            Destroy(this);
        }
    }
Exemplo n.º 13
0
    public override void OnSignalRecieved(eObject source, string[] signal)
    {
        base.OnSignalRecieved(source, signal);

        Debug.Log(signal[0]);

        switch (signal[0])
        {
        case "damage":
        case "damageToEnemy":
            if (source.GetState("IgnoreSwitch") > 0)
            {
                break;
            }
            if (!turnedOn)
            {
                turnedOn = true;
                GetComponent <Renderer>().material = debugtmp_newMaterial;

                if (!moveCam)
                {
                    TriggerEvent(targetObject, message);
                }
                else
                {
                    TriggerEvent(targetObject, message, 1.0f);
                    m_camCtrl.cameraMoveTo(camHelper.position, camHelper.rotation);
                    TriggerEvent(this, "cameraRet", 3.0f);
                }
            }
            break;

        case "cameraRet":
            m_camCtrl.cameraMoveBack();
            break;

            //todo: camera movement
        }
    }