public bool PlayerHit(MapCharacterBase.ANGLE a) { if (this.player) { return(true); } return(this.parent.Player.canmove[(int)a]); }
public mapWarp( IAudioEngine s, EventManager m, string name, Point po, int f, MapCharacterBase.ANGLE a, SaveData save) : base(s, m, save) { this.NoTimeNext = false; this.mapName = name; this.position = po; this.floor = f; this.angle = a; }
public MysteryData( IAudioEngine s, SceneMap p, Point po, int floor, MapCharacterBase.ANGLE a, MapField fi, string id, SaveData save, StreamReader reader, RandomMystery random) : base(s, p, po, floor, a, fi, id, save, reader, "") { this.position.Z = this.field.Height / 2 * floor; this.itemData = random; this.getInfo = this.itemData.getInfo; this.Update(); }
public Player( IAudioEngine s, SceneMap p, Point po, int floor, MapCharacterBase.ANGLE a, SceneMain m, SaveData save, float Z) : base(s, p, po, floor, a, null) { this.position.Z = Z; this.main = m; this.menu = new TopMenu(s, this, this.main, save); this.rendType = 1; this.savedata = save; this.player = true; this.info = new InfoMessage(this.sound, this.savedata); }
public MapChange( IAudioEngine s, EventManager m, string name, Point po, int f, MapCharacterBase.ANGLE a, SaveData save, MapField field) : base(s, m, save) { field.parent.parent.MapTextureAdd(name); field.parent.parent.MapTextureAdd(save.pluginMap); this.NoTimeNext = true; this.mapName = name; this.position = po; this.floor = f; this.angle = a; }
public CompanionCharacter( IAudioEngine s, SceneMap p, Point po, int floor, Player player, MapCharacterBase.ANGLE a, SaveData save) : base(s, p, po, floor, a, p.Field, "companion", save, "") { this.rendType = 1; this.player = player; this.position = new Vector3(player.position.X - 8f, player.position.Y - 8f, player.position.Z); this.angle = player.Angle; for (int index = 0; index < this.positionLog.Length; ++index) { this.positionLog[index] = this.position; this.angleLog[index] = this.angle; this.runLog[index] = player.run; } this.animespeed = 6; }
public MapCharacterBase( IAudioEngine s, SceneMap p, Point po, int floor, MapCharacterBase.ANGLE a, MapField fi) : base(s) { this.parent = p; this.angle = a; this.field = fi; this.floor = floor; if (this.field != null) { this.position = new Vector3(po.X, po.Y, floor); } else { this.position = new Vector3(po.X, po.Y, 0.0f); } }
private bool Move(MapCharacterBase.ANGLE a) { if (!this.parent.CanMove(a, this, this.floor)) { return(false); } if (NSGame.Debug.Encount && !this.savedata.FlagList[271]) { this.EncountCheck((int)a); } switch (a) { case MapCharacterBase.ANGLE.DOWN: this.position.X += this.walkSpeed; this.position.Y += this.walkSpeed; if ((uint)this.parent.step > 0U) { this.position.Z += this.walkSpeed; this.stepCounter += this.walkSpeed; break; } break; case MapCharacterBase.ANGLE.DOWNRIGHT: this.position.X += this.walkSpeed; if (this.parent.step == SceneMap.STEPS.rightstep) { this.position.Z += this.walkSpeed; this.stepCounter += this.walkSpeed; break; } break; case MapCharacterBase.ANGLE.RIGHT: this.position.X += this.walkSpeed / 2f; this.position.Y += (float)(-walkSpeed / 2.0); if (this.parent.step == SceneMap.STEPS.rightstep) { this.position.Z += this.walkSpeed / 2f; this.stepCounter += this.walkSpeed / 2f; if (this.overStep) { this.position.X += this.walkSpeed / 2f; this.position.Y += (float)(-walkSpeed / 2.0); this.position.Z += this.walkSpeed / 2f; this.stepCounter += this.walkSpeed / 2f; break; } break; } if (this.parent.step == SceneMap.STEPS.leftstepp) { this.position.Z -= this.walkSpeed / 2f; this.stepCounter -= this.walkSpeed / 2f; if (this.overStep) { this.position.X += this.walkSpeed / 2f; this.position.Y += (float)(-walkSpeed / 2.0); this.position.Z -= this.walkSpeed / 2f; this.stepCounter -= this.walkSpeed / 2f; } break; } break; case MapCharacterBase.ANGLE.UPRIGHT: this.position.Y += -this.walkSpeed; if (this.parent.step == SceneMap.STEPS.leftstepp) { this.position.Z -= this.walkSpeed; this.stepCounter -= this.walkSpeed; break; } break; case MapCharacterBase.ANGLE.UP: this.position.X += -this.walkSpeed; this.position.Y += -this.walkSpeed; if ((uint)this.parent.step > 0U) { this.position.Z -= this.walkSpeed; this.stepCounter -= this.walkSpeed; break; } break; case MapCharacterBase.ANGLE.UPLEFT: this.position.X += -this.walkSpeed; if (this.parent.step == SceneMap.STEPS.rightstep) { this.position.Z -= this.walkSpeed; this.stepCounter -= this.walkSpeed; break; } break; case MapCharacterBase.ANGLE.LEFT: this.position.X += (float)(-walkSpeed / 2.0); this.position.Y += this.walkSpeed / 2f; if (this.parent.step == SceneMap.STEPS.rightstep) { this.position.Z -= this.walkSpeed / 2f; this.stepCounter -= this.walkSpeed / 2f; if (this.overStep) { this.position.X += (float)(-walkSpeed / 2.0); this.position.Y += this.walkSpeed / 2f; this.position.Z -= this.walkSpeed / 2f; this.stepCounter -= this.walkSpeed / 2f; break; } break; } if (this.parent.step == SceneMap.STEPS.leftstepp) { this.position.Z += this.walkSpeed / 2f; this.stepCounter += this.walkSpeed / 2f; if (this.overStep) { this.position.X += (float)(-walkSpeed / 2.0); this.position.Y += this.walkSpeed / 2f; this.position.Z += this.walkSpeed / 2f; this.stepCounter += this.walkSpeed / 2f; } break; } break; case MapCharacterBase.ANGLE.DOWNLEFT: this.position.Y += this.walkSpeed; if (this.parent.step == SceneMap.STEPS.leftstepp) { this.position.Z += this.walkSpeed; this.stepCounter += this.walkSpeed; break; } break; } return(true); }
public void PositionSet(Point po, int f, MapCharacterBase.ANGLE a) { this.position = new Vector3(po.X, po.Y, 0.0f); this.angle = a; this.floor = f; }
public void MoveEndPosiSet() { Vector2 vector2 = new Vector2(this.position.X, this.position.Y); bool flag = false; this.EndAngle = this.Angle; for (int index = 0; index < this.moveOrder.Length; ++index) { switch (this.moveOrder[index].move) { case EventMove.MOVE.up: case EventMove.MOVE.warpup: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.UPRIGHT; } vector2.Y -= moveOrder[index].length; break; case EventMove.MOVE.down: case EventMove.MOVE.warpdown: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.DOWNLEFT; } vector2.Y += moveOrder[index].length; break; case EventMove.MOVE.left: case EventMove.MOVE.warpleft: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.UPLEFT; } vector2.X -= moveOrder[index].length; break; case EventMove.MOVE.right: case EventMove.MOVE.warpright: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.DOWNRIGHT; } vector2.X += moveOrder[index].length; break; case EventMove.MOVE.wayup: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.UPRIGHT; break; } break; case EventMove.MOVE.waydown: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.DOWNLEFT; break; } break; case EventMove.MOVE.wayleft: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.UPLEFT; break; } break; case EventMove.MOVE.wayright: if (!flag) { this.EndAngle = MapCharacterBase.ANGLE.DOWNRIGHT; break; } break; case EventMove.MOVE.wayfix: flag = true; break; case EventMove.MOVE.wayfixend: flag = false; break; } } this.moveEndPosition = vector2; this.moving = true; }