示例#1
0
        public static MonsterSizeModifier FlyingSizeModifier(float newSize)
        {
            MonsterSizeModifier sizeModifier = ScriptableObject.CreateInstance <MonsterSizeModifier>();

            sizeModifier.newSize       = newSize;
            sizeModifier.scaleCollider = true;

            return(sizeModifier);
        }
示例#2
0
        // 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);
        }
示例#3
0
        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);
        }
示例#4
0
 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);
 }
示例#5
0
 // 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);
 }