public ExplosionScript(Explosion explosion, ScriptEngine.OnEndFunc onEndFunc, int countStates, int delay)
        {
            currTimer = new Timer();

            currTimer.Interval = delay;
            this.onEnd         = onEndFunc;
            this.countStates   = countStates;
            this.currState     = this.countStates;
            this.obj           = explosion;
            currTimer.Elapsed += OnTimerEvent;
        }
Пример #2
0
        public SimpleScript(PhysicalObject obj, Image sprite, ScriptEngine.OnEndFunc onEndFunc, int countStates, int delay)
        {
            currTimer = new Timer();

            currTimer.Interval = delay;

            this.obj = obj;

            this.onEnd        = onEndFunc;
            this.countStates  = countStates;
            this.currState    = this.countStates;
            this.sprite       = new Bitmap(sprite as Bitmap);
            this.onScriptSize = obj.size;

            currTimer.Elapsed += OnTimerEvent;
        }