Esempio 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");
        }
    }
Esempio n. 2
0
    public override void OnObjectStay(eObject obj)
    {
        base.OnObjectStay(obj);

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

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

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

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

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

        if (obj.GetState("player") > 0)
        {
            Debug.Log("Player!");
            TriggerEvent(obj, "useCrystal");
        }
    }
Esempio 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));
        }
    }
Esempio 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);
            }
        }
    }
Esempio 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);
        }
    }
Esempio 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
        }
    }