public int frozenFrame = 0; // The frame that the character is frozen until (after resets, etc). public Character(RoomScene room, byte subType, FVector pos, Dictionary <string, short> paramList) : base(room, subType, pos, paramList) { this.Meta = Systems.mapper.ObjectMetaData[(byte)ObjectEnum.Character].meta; this.SetSpriteName("Stand"); // Physics, Collisions, etc. this.AssignBounds(8, 12, 28, 44); this.physics = new Physics(this); this.physics.SetGravity(FInt.Create(0.7)); // Default Stats & Statuses this.stats = new CharacterStats(this); this.status = new CharacterStatus(); this.wounds = new CharacterWounds(this); // Attachments this.trailKeys = new TrailingKeys(this); this.heldItem = new HeldItem(this); this.magiShield = new MagiShield(this); this.nameplate = new Nameplate(this, "Lana", false, false); // Images and Animations this.animate = new Animate(this, "/"); // Reset Character, Set Default Values this.ResetCharacter(); // Assign SubTypes and Params this.AssignSubType(subType); this.AssignParams(paramList); }
public static ProjectileMagi Create(MagiShield magiShield, GameObject actor, byte subType, byte numberOfBalls, byte ballNumber, byte radius, short regenFrames = 0) { ProjectileMagi projectile = new ProjectileMagi(); projectile.ResetMagiBall(magiShield, actor, subType, numberOfBalls, ballNumber, radius, regenFrames); return(projectile); }
public void ResetMagiBall(MagiShield magiShield, GameObject actor, byte subType, byte numberOfBalls, byte ballNumber, byte radius, short regenFrames = 0) { this.ResetProjectile(actor.room, subType, FVector.Create(0, 0), FVector.Create(0, 0)); this.magiShield = magiShield; this.actor = actor; this.ByCharacterId = actor.id; this.regenFrames = regenFrames; this.regenEnergy = regenFrames; this.regenAlpha = 1; this.radius = radius; this.isAlive = true; this.SetSafelyJumpOnTop(false); this.SetDamage(DamageStrength.Standard); this.AssignSubType(subType); this.AssignBoundsByAtlas(2, 2, -2, -2); this.SetOffset(numberOfBalls, ballNumber); this.SetEndLife(Systems.timer.Frame + (60 * 60 * 10)); // Ten minute lifespan. // Add the Projectile to Scene actor.room.AddToScene(this, true); }