示例#1
0
        public Tower_Base(int x, int y, int counter, string sprite)
        {
            Tower_delay  = new TimeSpan(0, 0, 0, 1, 2);
            Tower_cost   = 75;
            Tower_target = "";
            var X = x;
            var Y = y;

            Tower_sprite = sprite;

            Tower = Static.Functions.Create_entity("Tower1[" + counter + "]", x, y, Tower_sprite, ref Tower_bitmap);
            Tower_bitmap.DrawOrder = 0;

            Tower_bullet = new Bullet_Base(20, 4.0f, Tower.Name, "Content/Towers/Tower_Beta/Ammo1.wpk");
            get_action access = new get_action(Tower_bullet.Get_var_value);

            Get_action = new Action(access);
            WaveServices.TimerFactory.CreateTimer("Shooting_break[" + Tower.Name + "]", Tower_delay, Get_action);


            Tower.AddChild(Tower_bullet.Bullet);
        }
示例#2
0
        public Tower_Base(int x, int y, int counter, string sprite)
        {
            Tower_delay = new TimeSpan(0, 0, 0, 1, 2);
            Tower_cost = 75;
            Tower_target = "";
            var X = x;
            var Y = y;
            Tower_sprite = sprite;

            Tower = Static.Functions.Create_entity("Tower1["+counter+"]", x, y,Tower_sprite ,ref Tower_bitmap);
            Tower_bitmap.DrawOrder = 0;

            Tower_bullet = new Bullet_Base(20, 4.0f, Tower.Name, "Content/Towers/Tower_Beta/Ammo1.wpk");
            get_action access = new get_action(Tower_bullet.Get_var_value);
            Get_action = new Action(access);
            WaveServices.TimerFactory.CreateTimer("Shooting_break["+Tower.Name+"]", Tower_delay, Get_action);

            Tower.AddChild(Tower_bullet.Bullet);
        }