Example #1
0
    override public void hnExplosion(SimpleEvent evnt)
    {
        float power = 1;

        if (evnt != null && evnt.ExistParm <float>(EventParm.V_POWER))
        {
            power = evnt.GetParm <float>(EventParm.V_POWER);
        }
        CreateExplosion(power);
    }
Example #2
0
    override public void hnFireworks(SimpleEvent evnt)
    {
        float power = 1;

        if (evnt != null && evnt.ExistParm <float>(EventParm.V_POWER))
        {
            power = evnt.GetParm <float>(EventParm.V_POWER);
        }
        CreateFirework(power);
    }
        public bool Check(SimpleEvent evnt)
        {
            if (evnt == null)
            {
                return(false);
            }
            bool ret = true;

            ret = ret && (string.IsNullOrEmpty(ParmName) || evnt.ExistParm(ParmName));
            if (ret && !string.IsNullOrEmpty(ParmName))
            {
                object val = evnt.GetParm(ParmName);
                ret = ret && (ValueType == null || val.GetType().IsAssignableFrom(val.GetType()));
                ret = ret && (!CheckValue || Value == val);
            }
            return(ret);
        }