示例#1
0
 public SpawnCharacter(ActiveChar character, int charIndex)
 {
     this.charIndex = charIndex;
     charLoc        = character.CharLoc;
     charDir        = character.CharDir;
     form           = character.CharData;
 }
示例#2
0
 public CreateAction(int charIndex, ActiveChar character, CharSprite.ActionType action)
 {
     CharIndex = charIndex;
     Action    = action;
     charData  = character.CharData;
     dir       = character.CharDir;
 }
示例#3
0
 protected override void Choose(ActiveChar character, ref bool moveMade)
 {
     if (Processor.Inventory[CurrentChoice] >= 0)
     {
         MenuManager.Menus.Insert(0, new ItemChosenMenu(CurrentChoice));
     }
 }
示例#4
0
        protected override void Choose(ActiveChar character, ref bool moveMade)
        {
            switch (CurrentChoice)
            {
            case 0:
            {        //use
                MenuManager.Menus.Clear();
                Processor.ProcessDecision(new Command(Command.CommandType.Use, invSlot), character, ref moveMade);
            }
            break;

            case 1:
            {        //throw
                MenuManager.Menus.Clear();
                Processor.ProcessDecision(new Command(Command.CommandType.Throw, invSlot), character, ref moveMade);
            }
            break;

            case 2:
            {        //drop
                MenuManager.Menus.Clear();
                Processor.ProcessDecision(new Command(Command.CommandType.Drop, invSlot), character, ref moveMade);
            }
            break;
            }
        }
示例#5
0
 public CreateAction(int charIndex, ActiveChar character, CharSprite.ActionType action, bool looping, bool inPlace)
 {
     CharIndex = charIndex;
     Action    = action;
     charData  = character.CharData;
     dir       = character.CharDir;
     Looping   = looping;
     InPlace   = inPlace;
 }
示例#6
0
 public CreateAction(int charIndex, ActiveChar character, CharSprite.ActionType action, bool looping, bool inPlace)
 {
     this.charIndex = charIndex;
     this.Action = action;
     this.charData = character.CharData;
     this.dir = character.CharDir;
     this.Looping = looping;
     this.InPlace = inPlace;
 }
示例#7
0
 public override void Process(Input input, ActiveChar character, ref bool moveMade)
 {
     if (input[Input.InputType.Q] && !Processor.PrevInput[Input.InputType.Q])
     {
         MenuManager.Menus.RemoveAt(0);
     }
     else
     {
         base.Process(input, character, ref moveMade);
     }
 }
示例#8
0
        public void Save()
        {
            if (ActiveChar == null)
            {
                return;
            }

            ActiveChar.Delete();
            ObjectIdManager.Instance.ReleaseId(ActiveChar.ObjId);

            ActiveChar.Save();
        }
示例#9
0
        public Character SetActiveChar(int slot)
        {
            // Remove prev char from world
            if (ActiveChar != null)
            {
                ActiveChar.Delete();
            }

            mActiveChar = slot;
            if (ActiveChar != null)
            {
                // We have an active character, load full data
                ActiveChar.LoadFull();
                // Push it
                World.Objects.Add(ActiveChar);
            }

            return(ActiveChar);
        }
示例#10
0
        protected override void Choose(ActiveChar character, ref bool moveMade)
        {
            switch (CurrentChoice)
            {
            case 0:
            {
                MenuManager.Menus.Clear();
                Processor.ProcessDecision(new Command(Command.CommandType.Wait), character, ref moveMade);
            }
            break;

            case 1:
            {
                MenuManager.Menus.Clear();
                Processor.StartDungeon(Processor.Seed);
            }
            break;

            case 2:
            {
                MenuManager.Menus.Clear();
                Processor.StartDungeon(Processor.Rand.Next());
            }
            break;

            case 3:
            {
                this.Visible = false;
                MenuManager.Menus.Insert(0, new ReplayMenu());
            }
            break;

            case 4:
            {        //item
                MenuManager.Menus.RemoveAt(0);
                Editors.EditorManager.OpenItemEditor();
            }
            break;

            case 5:
            {        //move
                MenuManager.Menus.RemoveAt(0);
                Editors.EditorManager.OpenSpellEditor();
            }
            break;

            case 6:
            {        //map
                MenuManager.Menus.RemoveAt(0);
                //Editors.EditorManager.OpenMapEditor();

                break;
            }

            case 7:
            {        //dungeon
                MenuManager.Menus.RemoveAt(0);
                Editors.EditorManager.OpenRDungeonEditor();
            }
            break;

            default:
            {
                MenuManager.Menus.RemoveAt(0);
            }
            break;
            }
        }
示例#11
0
 public Defeated(int charIndex, ActiveChar character)
 {
     this.charIndex = charIndex;
     this.charData  = character.CharData;
     this.dir       = character.CharDir;
 }
示例#12
0
 public Target(ActiveChar character, Enums.Alignment alignment, int distance)
 {
     Character       = character;
     TargetAlignment = alignment;
     Distance        = distance;
 }
示例#13
0
 protected override void Choose(ActiveChar character, ref bool moveMade)
 {
     MenuManager.Menus.Clear();
     Processor.ProcessDecision(new Command(Command.CommandType.Spell, CurrentChoice), character, ref moveMade);
 }