public static MonsterSizeModifier FlyingSizeModifier(float newSize) { MonsterSizeModifier sizeModifier = ScriptableObject.CreateInstance <MonsterSizeModifier>(); sizeModifier.newSize = newSize; sizeModifier.scaleCollider = true; return(sizeModifier); }
// eh don't need these but same as above internal static MonsterSizeModifier GroundSizeModifier(float newSize) { MonsterSizeModifier sizeModifier = ScriptableObject.CreateInstance <MonsterSizeModifier>(); sizeModifier.newSize = newSize; sizeModifier.scaleCollider = false; return(sizeModifier); }
public static void AddSimpleVariant(string bodyName, float spawnRate, MonsterVariantTier tier, MonsterSizeModifier size, float health, float moveSpeed, float attackSpeed, float damage, float armor, float armorBonus, int alienHeads, Material replacementMaterial, Mesh replacementMesh) { MonsterMaterialReplacement[] replacementMats = null; if (replacementMaterial != null) { replacementMats = SimpleMaterialReplacement(replacementMaterial); } MonsterMeshReplacement[] replacementMeshes = null; if (replacementMesh != null) { replacementMeshes = SimpleMeshReplacement(replacementMesh); } MonsterVariantInfo newInfo = new MonsterVariantInfo { bodyName = bodyName, spawnRate = spawnRate, variantTier = tier, sizeModifier = size, healthMultiplier = health, moveSpeedMultiplier = moveSpeed, attackSpeedMultiplier = attackSpeed, damageMultiplier = damage, armorMultiplier = armor, armorBonus = armorBonus, customInventory = SimpleInventory("AlienHead", alienHeads), meshReplacement = replacementMeshes, materialReplacement = replacementMats, skillReplacement = null, buff = BuffIndex.None }; Components.VariantHandler variantHandler = Resources.Load <GameObject>("Prefabs/CharacterBodies/" + bodyName + "Body").AddComponent <Components.VariantHandler>(); variantHandler.Init(newInfo); }
public static void AddSimpleVariant(string bodyName, float spawnRate, MonsterVariantTier tier, MonsterSizeModifier size, float health, float moveSpeed, float attackSpeed, float damage, float armor, float armorBonus, int alienHeads, Mesh replacementMesh) { AddSimpleVariant(bodyName, spawnRate, tier, size, health, moveSpeed, attackSpeed, damage, armor, armorBonus, alienHeads, null, replacementMesh); }
// helpers for adding simple variants public static void AddSimpleVariant(string bodyName, float spawnRate, MonsterVariantTier tier, MonsterSizeModifier size, float health, float moveSpeed, float attackSpeed, float damage, float armor, float armorBonus) { AddSimpleVariant(bodyName, spawnRate, tier, size, health, moveSpeed, attackSpeed, damage, armor, armorBonus, 0, null, null); }