Ejemplo n.º 1
0
        public Kunkka(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.playerHandle = owner.BaseOwner.Handle;

            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.kunkka_torrent, x => this.torrent = new Torrent(x) },
                { AbilityId.kunkka_tidebringer, x => this.tidebringer = new TargetableAbility(x) },
                { AbilityId.kunkka_x_marks_the_spot, x => this.xMark = new XMark(x) },
                { AbilityId.kunkka_return, x => this.xReturn = new UntargetableAbility(x) },
                { AbilityId.kunkka_ghostship, x => this.ship = new Ghostship(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_armlet, x => this.armlet = new BuffAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) },
            };

            this.ancientCamps = Context9.JungleManager.JungleCamps.Where(x => x.IsAncient).Select(x => x.CreepsPosition).ToArray();

            ParticleManager.ParticleAdded += OnParticleAdded;
            ModifierManager.ModifierAdded += OnModifierAdded;
            OrderManager.OrderAdding      += OnOrderAdding;
        }
Ejemplo n.º 2
0
        internal Marker ReadMarker(GameField field)
        {
            String str    = sr.ReadLine();
            Marker marker = null;

            while (!str.Contains("End marker"))
            {
                String type = str;
                str = sr.ReadLine();
                switch (type)
                {
                case "Aim":
                    marker = new Aim(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                    break;

                case "Circle":
                    marker = new Circle(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                    break;

                case "Check":
                    marker = new Check(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                    break;

                case "Flag":
                    marker = new Flag(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                    break;

                case "XMark":
                    marker = new XMark(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                    break;
                }
                str = sr.ReadLine();
            }
            return(marker);
        }
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();
            // TODO: use this.Content to load your game content here

            // Setting up Screen Resolution
            // Read more here: http://rbwhitaker.wikidot.com/changing-the-window-size
            graphics.PreferredBackBufferWidth  = 640;
            graphics.PreferredBackBufferHeight = 480;
            graphics.IsFullScreen = false;
            graphics.ApplyChanges();

            theline            = new Line();
            theline.width     *= 3;
            theline.color      = Color.GreenYellow;
            theline.startPoint = Vector2.Zero;
            theline.endPoint   = new Vector2(10, 10);


            theGrid        = new Grid2D();
            xMark          = new XMark();
            xMark.Location = new Vector2(3, 5);
            xMark.LineColorLocal(Color.Red);
            xMark.LineWidthLocal(4f);
        }
Ejemplo n.º 4
0
    public void reset_player_right()
    {
        transform.position   = new Vector3(15, 0, 0);
        transform.localScale = new Vector2(0.2f, 0.2f);
        mana = (int)ManaStrip.maxValue;

        sizeShrink ss = GetComponent <sizeShrink>();

        if (ss != null)
        {
            ss.nextCast1 = 0;
            ss.nextCast2 = 0;
            ss.nextCast3 = 0;
        }
        doorMove dm = GetComponent <doorMove>();

        if (dm != null)
        {
            dm.nextCast1 = 0;
            dm.nextCast2 = 0;
            dm.nextCast3 = 0;
        }
        freeze f = GetComponent <freeze>();

        if (f != null)
        {
            f.nextCast1 = 0;
            f.nextCast2 = 0;
            f.nextCast3 = 0;
        }
        XMark x = GetComponent <XMark>();

        if (x != null)
        {
            x.nextCast1 = 0;
            x.nextCast2 = 0;
            x.nextCast3 = 0;
        }
        evolve e = GetComponent <evolve>();

        if (e != null)
        {
            e.nextCast1 = 0;
            e.nextCast2 = 0;
            e.nextCast3 = 0;
        }
        teleport t = GetComponent <teleport>();

        if (t != null)
        {
            t.nextCast1 = 0;
            t.nextCast2 = 0;
            t.nextCast3 = 0;
        }
        fireWall fw = GetComponent <fireWall>();

        if (fw != null)
        {
            fw.nextCast1 = 0;
            fw.nextCast2 = 0;
            fw.nextCast3 = 0;
        }
    }