// ENG: Initialization // JAP: 初期化。 public virtual void Init(Stats newstats, float speedmultiplyer, ElementType type, SkillTier tier) { if (_rigidbody == null) { CacheObject(); } if (_properties != null) { Destroy(_properties); } _properties = newstats; _stats = new SlimeStats(); _properties.HealthProperties = MaxHitPoint; _properties.SpeedMultiplyerProperties = speedmultiplyer; _stats.Elementtype = type; _stats.IsDead = false; _stats.MovementRange = UnityEngine.Random.Range(5.0f, 10.0f); _stats.MaxMovementRange = 3.0f; _rigidbody.velocity = Vector3.zero; _tier = tier; Material.SetColor("_Color", _stats.Elementtype.GetColor()); }
public static string SkillTierToString(SkillTier tier) { string rarity = ""; switch (tier) { case SkillTier.n: rarity = "n"; break; case SkillTier.r: rarity = "r"; break; case SkillTier.sr: rarity = "sr"; break; case SkillTier.ssr: rarity = "ssr"; break; } return(rarity); }
public override List <GameObject> GetTargets(ref Vector3 casting_position, ref SkillTier tier, ref GameObjectList targets, ref GameObject caster) { List <GameObject> list = new List <GameObject>(); list.Add(caster); return(list); }
public override List <GameObject> GetTargets(ref Vector3 casting_position, ref SkillTier tier, ref GameObjectList targets, ref GameObject caster) { List <GameObject> list = new List <GameObject>(); foreach (GameObject obj in targets.GetList()) { if (ObjectManager.Instance.GetActiveObjects(obj) != null) { foreach (GameObject entity in ObjectManager.Instance.GetActiveObjects(obj)) { if (Vector3.Distance(casting_position, entity.transform.position) < _Range * ((tier != null) ? tier.GetMultiplyer() : 1)) { list.Add(entity); } } } } return(list); }
public abstract List <GameObject> GetTargets(ref Vector3 caster_position, ref SkillTier tier, ref GameObjectList targets, ref GameObject caster);
public void Grow(SkillTier tier) { _tier = tier; }
public void SetTier(SkillTier newTier) { _tier = newTier; }
public ItemSkillParamFile(string inFilename, byte[] rawData, byte[] subHeader, int[] ptrs, int baseAddr) { filename = inFilename; header = subHeader; MemoryStream inStream = new MemoryStream(rawData); BinaryReader inReader = new BinaryReader(inStream); inStream.Seek(8, SeekOrigin.Begin); int headerLoc = inReader.ReadInt32(); inStream.Seek(headerLoc, SeekOrigin.Begin); int tiers = inReader.ReadInt32(); int hitboxLoc = inReader.ReadInt32() - baseAddr; int skillLoc = inReader.ReadInt32() - baseAddr; int hitboxCount = (skillLoc - hitboxLoc) / 4; hitBoxes = new ushort[hitboxCount][]; int highestIndex = 0; byte[] tempIndexes = inReader.ReadBytes(7); skillIndexes = new sbyte[7]; for (int i = 0; i < tempIndexes.Length; i++) { if (tempIndexes[i] == 0xFF) { skillIndexes[i] = -1; } else { skillIndexes[i] = (sbyte)(tempIndexes[i] / tiers); } } highestIndex = skillIndexes.Max() + 1; inStream.Seek(hitboxLoc, SeekOrigin.Begin); for (int i = 0; i < hitBoxes.Length; i++) { hitBoxes[i] = new ushort[2]; hitBoxes[i][0] = inReader.ReadUInt16(); hitBoxes[i][1] = inReader.ReadUInt16(); } allSkills = new SkillTier[highestIndex][]; inStream.Seek(skillLoc, SeekOrigin.Begin); for (int i = 0; i < highestIndex; i++) { allSkills[i] = new SkillTier[tiers]; for (int j = 0; j < tiers; j++) { SkillTier tempTier = new SkillTier(); tempTier.hit1Unknown = inReader.ReadByte(); tempTier.hit2Unknown = inReader.ReadByte(); tempTier.hit3Unknown = inReader.ReadByte(); tempTier.unknownByte1 = inReader.ReadByte(); tempTier.hit1PP = inReader.ReadByte(); tempTier.hit2PP = inReader.ReadByte(); tempTier.hit3PP = inReader.ReadByte(); tempTier.hit1Targets = inReader.ReadByte(); tempTier.hit2Targets = inReader.ReadByte(); tempTier.hit3Targets = inReader.ReadByte(); tempTier.numAttacks = inReader.ReadInt16(); tempTier.expPerLevel = inReader.ReadInt32(); tempTier.expGrowth = inReader.ReadInt16(); tempTier.hit1AtpMod = inReader.ReadInt16(); tempTier.hit1AtaMod = inReader.ReadInt16(); tempTier.hit1AtpGrowth = inReader.ReadByte(); tempTier.hit1AtaGrowth = inReader.ReadByte(); tempTier.hit1Hitbox = inReader.ReadByte(); tempTier.hit2Hitbox = inReader.ReadByte(); tempTier.hit3Hitbox = inReader.ReadByte(); tempTier.unknownByte2 = inReader.ReadByte(); tempTier.hit2AtpMod = inReader.ReadInt16(); tempTier.hit3AtpMod = inReader.ReadInt16(); tempTier.hit2AtpGrowth = inReader.ReadByte(); tempTier.hit3AtpGrowth = inReader.ReadByte(); tempTier.unknownByte3 = inReader.ReadByte(); tempTier.unknownByte4 = inReader.ReadByte(); allSkills[i][j] = tempTier; } } }
public void SetSkillTier(SkillTier tier) { _SkillTier = tier; }