// Token: 0x060010B2 RID: 4274 RVA: 0x00066E48 File Offset: 0x00065048 public void ShowThirdPersonEffect(CharacterConfig player, QuickItemLogic effectType, int robotLifeTime, int scrapsLifeTime, bool isInstant = false) { robotLifeTime = ((robotLifeTime <= 0) ? 5000 : robotLifeTime); scrapsLifeTime = ((scrapsLifeTime <= 0) ? 3000 : scrapsLifeTime); QuickItemSfx original; if (this._effects.TryGetValue(effectType, out original)) { QuickItemSfx quickItemSfx = UnityEngine.Object.Instantiate(original) as QuickItemSfx; quickItemSfx.ID = this.NextSfxId; if (quickItemSfx) { this._curShownEffects.Add(quickItemSfx.ID, quickItemSfx); quickItemSfx.transform.parent = player.transform; quickItemSfx.transform.localRotation = Quaternion.AngleAxis(-45f, Vector3.up); quickItemSfx.transform.localPosition = new Vector3(0f, 0.2f, 0f); quickItemSfx.Play(robotLifeTime, scrapsLifeTime, isInstant); LayerUtil.SetLayerRecursively(quickItemSfx.transform, UberstrikeLayer.IgnoreRaycast); } } else { Debug.LogError("Failed to get effect: " + effectType); } }
// Token: 0x06001A9B RID: 6811 RVA: 0x0008B208 File Offset: 0x00089408 private void ConfigureAvatar(GameActorInfo info, CharacterConfig character, bool isLocal) { if (character != null && info != null) { if (isLocal) { this.Player.SetCurrentCharacterConfig(character); this.Player.MoveController.IsLowGravity = GameFlags.IsFlagSet(GameFlags.GAME_FLAGS.LowGravity, this.RoomData.GameFlags); character.Initialize(this.PlayerData, this.Avatar); } else { global::Avatar avatar = new global::Avatar(new Loadout(info.Gear, info.Weapons), false); avatar.SetDecorator(global::AvatarBuilder.CreateRemoteAvatar(avatar.Loadout.GetAvatarGear(), info.SkinColor)); character.Initialize(this.RemotePlayerStates.GetState(info.PlayerId), avatar); GameData.Instance.OnHUDStreamMessage.Fire(info, LocalizedStrings.JoinedTheGame, null); } if (!info.IsAlive) { character.SetDead(Vector3.zero, BodyPart.Body, 0, UberstrikeItemClass.WeaponMachinegun); } } else { Debug.LogError(string.Format("OnAvatarLoaded failed because loaded Avatar is {0} and Info is {1}", character != null, info != null)); } }
public void Init(CharacterData d, bool monster) { config = CharacterConfigManager.instance.Get(d.configId); data = d; isMonster = monster; speed = d.speed + config.speed; attack = d.attack + config.attack; crit = d.crit + config.crit; critDamge = (d.critDamage + config.critDamage) / 100f; defense = config.defense; hp = d.hp + config.hp; special = d.specialType; maxHp = hp; if (config.skillId1 > 0) { skill = SkillManager.instance.CreateSkill(config.skillId1, this); } if (config.passiveSkillId > 0) { passiveSkill = PassiveSkillManager.instance.CreateSkill(config.passiveSkillId, this); } normalAttackSkill = SkillManager.instance.CreateSkill(config.normalAttackSkillId, this); animation = GetComponentInChildren <Animation>(); }
public CharacterModel(CharacterConfig config, Vector3 position, CharacterEventHandler eventHandler) { _eventHandler = eventHandler; Config = config; Health = config.Health; _armour = config.Armour; Position = position; }
public GameObject SpawnEnemy(Transform spawnPos, CharacterConfig type) { GameObject enemy = Instantiate(enemyPrefab); enemy.GetComponent <BeingController>().Init(type); enemy.transform.position = spawnPos.position; return(enemy); }
public CharacterSelectionData(TeamConfig teamConfig, CharacterConfig config, bool isAttacker, Action <CharacterConfig> selectAction, bool pauseGameActiveState) { TeamConfig = teamConfig; Config = config; IsAttacker = isAttacker; SelectAction = selectAction; PauseGameActiveState = pauseGameActiveState; }
private PictureBox GetBoxByName(string boxName) { var shortcut = CharacterConfig.CodeFromCharacterEnum(currentCharacterType); var s = shortcut + boxName; PictureBox mybox = (PictureBox)this.Controls.Find(s, true)[0]; return(mybox); }
public void GetByteStreamPairTest() { var stream_result = CharacterConfig.GetByteStreamPair(CharacterConfig.CHARACTERS.Dictator, CharacterConfig.BUTTONS.lp); var sprite_result = stream_result.spriteStream; var sprite_expected = CharacterConfig.GetSpriteResourceFromRom(CharacterConfig.CHARACTERS.Dictator, CharacterConfig.BUTTONS.lp); CollectionAssert.AreEqual(sprite_expected, sprite_result); }
/// <summary> /// Show Panel /// </summary> public override void Show() { base.Show(); this.CharacterConfig = HUDManager.Instance.SelectedCharacterConfig.Copy(); this.SelectEditorType(EditorTypes.CharacterEditor); this.SaveWarningPanel.SetActive(false); this.ChangesMade = false; }
public void Init(PlayerConfig player, CharacterConfig character) { // healthText.GetComponent<Text> ().color = player.color; bar.Init(player.color); maxHealth = character.healthPoints; numHealthLeft = maxHealth; UpdateHealthText(); }
public static CharacterConfig ReadCharacterConfig(string characterName) { CharacterConfig config = ConfigReader.Parse <CharacterConfig>(ResourceLoader.LoadText("Chars/" + characterName + "/" + characterName + ".def")); ActionsConfig actionsConfig = ConfigReader.Parse <ActionsConfig>(ResourceLoader.LoadText(config.action)); string commands = ResourceLoader.LoadText(config.command); config.SetActions(actionsConfig.actions.ToArray()); config.SetCommand(commands); return(config); }
public void CreateDicPortraitFromConfigTest() { Character d = Character.CreateDefaultCharacter(CharacterConfig.CHARACTERS.Dictator, CharacterConfig.BUTTONS.lp); var p = d.portrait; Assert.IsNotNull(p); Assert.AreEqual("FF0F", PaletteHelper.ColorToMemFormat(p.GetColor("skin1"))); Assert.AreEqual("D90F", PaletteHelper.ColorToMemFormat(p.GetColor("skin2"))); Assert.AreEqual("960E", PaletteHelper.ColorToMemFormat(p.GetColor("skin3"))); Assert.AreEqual("750C", PaletteHelper.ColorToMemFormat(p.GetColor("skin4"))); Assert.AreEqual("640A", PaletteHelper.ColorToMemFormat(p.GetColor("skin5"))); Assert.AreEqual("5408", PaletteHelper.ColorToMemFormat(p.GetColor("skin6"))); Assert.AreEqual("4306", PaletteHelper.ColorToMemFormat(p.GetColor("skin7"))); Assert.AreEqual("FE0F", PaletteHelper.ColorToMemFormat(p.GetColor("piping1"))); Assert.AreEqual("F90F", PaletteHelper.ColorToMemFormat(p.GetColor("piping2"))); Assert.AreEqual("D50F", PaletteHelper.ColorToMemFormat(p.GetColor("piping3"))); Assert.AreEqual("A00F", PaletteHelper.ColorToMemFormat(p.GetColor("piping4"))); Assert.AreEqual("8E00", PaletteHelper.ColorToMemFormat(p.GetColor("costume1"))); Assert.AreEqual("6D03", PaletteHelper.ColorToMemFormat(p.GetColor("costume2"))); Assert.AreEqual("4C00", PaletteHelper.ColorToMemFormat(p.GetColor("costume3"))); Assert.AreEqual("2A02", PaletteHelper.ColorToMemFormat(p.GetColor("costume4"))); Assert.AreEqual("000F", PaletteHelper.ColorToMemFormat(p.GetColor("blood1"))); Assert.AreEqual("000C", PaletteHelper.ColorToMemFormat(p.GetColor("blood2"))); Assert.AreEqual("000A", PaletteHelper.ColorToMemFormat(p.GetColor("blood3"))); Assert.AreEqual("FF0F", PaletteHelper.ColorToMemFormat(p.GetColor("teeth1"))); Assert.AreEqual("CC0C", PaletteHelper.ColorToMemFormat(p.GetColor("teeth2"))); Assert.AreEqual("9909", PaletteHelper.ColorToMemFormat(p.GetColor("teeth3"))); Assert.AreEqual("7707", PaletteHelper.ColorToMemFormat(p.GetColor("teeth4"))); Assert.AreEqual("7F09", PaletteHelper.ColorToMemFormat(p.GetColor("pipingloss1"))); Assert.AreEqual("5D09", PaletteHelper.ColorToMemFormat(p.GetColor("pipingloss2"))); Assert.AreEqual("3B09", PaletteHelper.ColorToMemFormat(p.GetColor("pipingloss3"))); Assert.AreEqual("0909", PaletteHelper.ColorToMemFormat(p.GetColor("pipingloss4"))); Assert.AreEqual("7C00", PaletteHelper.ColorToMemFormat(p.GetColor("costumeloss1"))); Assert.AreEqual("5B03", PaletteHelper.ColorToMemFormat(p.GetColor("costumeloss2"))); Assert.AreEqual("4A00", PaletteHelper.ColorToMemFormat(p.GetColor("costumeloss3"))); Assert.AreEqual("0900", PaletteHelper.ColorToMemFormat(p.GetColor("costumeloss4"))); var portrait_bytestream_expected = CharacterConfig.GetPortraitResourceFromRom(CharacterConfig.CHARACTERS.Dictator, CharacterConfig.BUTTONS.lp); var portrait_bytestream_result = p.ToByteStream(); for (int i = 0; i < portrait_bytestream_expected.Length; i++) { if (i % 32 == 31 || i % 32 == 30 || i == 85) // end of line chars and unused color { continue; } Assert.AreEqual(portrait_bytestream_expected[i], portrait_bytestream_result[i]); } }