Exemple #1
0
        void OnEnable()
        {
            layerMask    = serializedObject.FindProperty("layerMask");
            damageType   = serializedObject.FindProperty("damageType");
            damageRadius = serializedObject.FindProperty("damageRadius");
            damageNature = serializedObject.FindProperty("damageNature");
            damagePoint  = serializedObject.FindProperty("damagePoint");

            isPhysic     = serializedObject.FindProperty("isPhysic");
            force        = serializedObject.FindProperty("force");
            forceMode    = serializedObject.FindProperty("forceMode");
            impactEffect = serializedObject.FindProperty("impactEffect");

            rayAdvance = serializedObject.FindProperty("rayAdvance");
            rayRadius  = serializedObject.FindProperty("rayRadius");

            scale          = serializedObject.FindProperty("scale");
            isUvAnimated   = serializedObject.FindProperty("isUvAnimated");
            animationSpeed = serializedObject.FindProperty("animationSpeed");

            isOscillation        = serializedObject.FindProperty("isOscillation");
            isDynamicOscillation = serializedObject.FindProperty("isDynamicOscillation");
            subdivisionAmount    = serializedObject.FindProperty("subdivisionAmount");
            frequency            = serializedObject.FindProperty("frequency");
            amplitude            = serializedObject.FindProperty("amplitude");

            damageLabels = CoreShooterKitEditor.GetDamageNature().damageNatures;
        }
Exemple #2
0
        void OnEnable()
        {
            isAutonomous  = serializedObject.FindProperty("isAutonomous");
            faction       = serializedObject.FindProperty("faction");
            enableAtStart = serializedObject.FindProperty("enableAtStart");
            speed         = serializedObject.FindProperty("speed");

            hubRotation  = serializedObject.FindProperty("hubRotation");
            axisRotation = serializedObject.FindProperty("axisRotation");

            // Faction
            factions = CoreShooterKitEditor.GetAllFaction();
            Array.Resize <string>(ref factionLabels, factions.Length);
            for (int i = 0; i < factions.Length; i++)
            {
                factionLabels[i] = factions[i].name;
            }

            // update faction
            for (int i = 0; i < factions.Length; i++)
            {
                if (faction.objectReferenceValue == factions[i])
                {
                    factionIndex = i;
                }
            }
        }
        void OnEnable()
        {
            autonomous         = serializedObject.FindProperty("autonomous");
            autoTarget         = serializedObject.FindProperty("autoTarget");
            autoReTarget       = serializedObject.FindProperty("autoReTarget");
            maxMissileOnTarget = serializedObject.FindProperty("maxMissileOnTarget");
            lifeTime           = serializedObject.FindProperty("lifeTime");
            layerMask          = serializedObject.FindProperty("layerMask");
            projectileDamage   = serializedObject.FindProperty("projectileDamage");
            damageType         = serializedObject.FindProperty("damageType");
            damageRadius       = serializedObject.FindProperty("damageRadius");
            damageNature       = serializedObject.FindProperty("damageNature");
            damagePoint        = serializedObject.FindProperty("damagePoint");
            randomDamagePoint  = serializedObject.FindProperty("randomDamagePoint");
            damagePointMax     = serializedObject.FindProperty("damagePointMax");
            isPhysic           = serializedObject.FindProperty("isPhysic");
            force      = serializedObject.FindProperty("force");
            forceMode  = serializedObject.FindProperty("forceMode");
            useAdvance = serializedObject.FindProperty("useAdvance");

            subWeapon = serializedObject.FindProperty("subWeapon");


            velocity        = serializedObject.FindProperty("velocity");
            straightTime    = serializedObject.FindProperty("straightTime");
            angularSpeed    = serializedObject.FindProperty("angularSpeed");
            chaos           = serializedObject.FindProperty("chaos");
            chaosFrenquency = serializedObject.FindProperty("chaosFrenquency");

            rayAdvance = serializedObject.FindProperty("rayAdvance");
            rayRadius  = serializedObject.FindProperty("rayRadius");

            impactEffect = serializedObject.FindProperty("impactEffect");
            deathEffect  = serializedObject.FindProperty("deathEffect");

            timedEffect = serializedObject.FindProperty("timedEffect");
            time        = serializedObject.FindProperty("time");

            damageLabels = CoreShooterKitEditor.GetDamageNature().damageNatures;

            showProperties = serializedObject.FindProperty("showProperties");
            showDamage     = serializedObject.FindProperty("showDamage");
            showPhysic     = serializedObject.FindProperty("showPhysic");
            showEffect     = serializedObject.FindProperty("showEffect");
        }
Exemple #4
0
        void OnEnable()
        {
            projectileType    = serializedObject.FindProperty("projectileType");
            lifeTime          = serializedObject.FindProperty("lifeTime");
            layerMask         = serializedObject.FindProperty("layerMask");
            projectileDamage  = serializedObject.FindProperty("projectileDamage");
            damageType        = serializedObject.FindProperty("damageType");
            damageRadius      = serializedObject.FindProperty("damageRadius");
            damageNature      = serializedObject.FindProperty("damageNature");
            damagePoint       = serializedObject.FindProperty("damagePoint");
            randomDamagePoint = serializedObject.FindProperty("randomDamagePoint");
            damagePointMax    = serializedObject.FindProperty("damagePointMax");

            subWeapon = serializedObject.FindProperty("subWeapon");

            isPhysic  = serializedObject.FindProperty("isPhysic");
            force     = serializedObject.FindProperty("force");
            forceMode = serializedObject.FindProperty("forceMode");

            velocity            = serializedObject.FindProperty("velocity");
            rayAdvance          = serializedObject.FindProperty("rayAdvance");
            rayRadius           = serializedObject.FindProperty("rayRadius");
            projectileForceMode = serializedObject.FindProperty("projectileForceMode");

            impactEffect = serializedObject.FindProperty("impactEffect");
            deathEffect  = serializedObject.FindProperty("deathEffect");

            timedEffect = serializedObject.FindProperty("timedEffect");
            time        = serializedObject.FindProperty("time");

            damageLabels = CoreShooterKitEditor.GetDamageNature().damageNatures;


            showProperties = serializedObject.FindProperty("showProperties");
            showDamage     = serializedObject.FindProperty("showDamage");
            showPhysic     = serializedObject.FindProperty("showPhysic");
            showEffect     = serializedObject.FindProperty("showEffect");
        }
        void OnEnable()
        {
            fpsAlignment   = serializedObject.FindProperty("fpsAlignment");
            fixedAlignment = serializedObject.FindProperty("fixedAlignment");
            alignmentPoint = serializedObject.FindProperty("alignmentPoint");

            isAutonomous         = serializedObject.FindProperty("isAutonomous");
            faction              = serializedObject.FindProperty("faction");
            ammunition           = serializedObject.FindProperty("ammunition");
            weaponType           = serializedObject.FindProperty("weaponType");
            fireRate             = serializedObject.FindProperty("fireRate");
            barrels              = serializedObject.FindProperty("barrels");
            isSynchronizedBarrel = serializedObject.FindProperty("isSynchronizedBarrel");

            isFullyAutmotic  = serializedObject.FindProperty("isAutmotic");
            isBurst          = serializedObject.FindProperty("isBurst");
            isOneShot        = serializedObject.FindProperty("isOneShot");
            burstShotsAmount = serializedObject.FindProperty("burstShotsAmount");

            enableMagazine     = serializedObject.FindProperty("enableMagazine");
            magazineAutoReload = serializedObject.FindProperty("magazineAutoReload");
            magazineCapacity   = serializedObject.FindProperty("magazineCapacity");
            shotValue          = serializedObject.FindProperty("shotValue");
            reloadValue        = serializedObject.FindProperty("reloadValue");
            magazineType       = serializedObject.FindProperty("magazineType");

            enableAmmunitionStock = serializedObject.FindProperty("enableAmmunitionStock");
            ammunitionMaxStock    = serializedObject.FindProperty("ammunitionMaxStock");
            ammunitionStock       = serializedObject.FindProperty("ammunitionStock");

            muzzleEffect        = serializedObject.FindProperty("muzzleEffect");
            startShootingEffect = serializedObject.FindProperty("startShootingEffect");
            StopShootingEffect  = serializedObject.FindProperty("StopShootingEffect");

            onStartShooting = serializedObject.FindProperty("onStartShooting");
            onShooting      = serializedObject.FindProperty("onShooting");
            onStopShooting  = serializedObject.FindProperty("onStopShooting");
            onReload        = serializedObject.FindProperty("onReload");
            onNeedReload    = serializedObject.FindProperty("onNeedReload");
            OnReloadEnd     = serializedObject.FindProperty("onReloadEnd");
            OnAutoReload    = serializedObject.FindProperty("onAutoReload");

            showProperties = serializedObject.FindProperty("showProperties");
            showMode       = serializedObject.FindProperty("showMode");
            showMagazine   = serializedObject.FindProperty("showMagazine");
            showEffect     = serializedObject.FindProperty("showEffect");
            showEvents     = serializedObject.FindProperty("showEvents");
            showStock      = serializedObject.FindProperty("showStock");

            // Faction
            factions = CoreShooterKitEditor.GetAllFaction();
            Array.Resize <string>(ref factionLabels, factions.Length);
            for (int i = 0; i < factions.Length; i++)
            {
                factionLabels[i] = factions[i].name;
            }

            for (int i = 0; i < factions.Length; i++)
            {
                if (faction.objectReferenceValue == factions[i])
                {
                    factionIndex = i;
                }
            }
        }
        void OnEnable()
        {
            faction    = serializedObject.FindProperty("faction");
            entityType = serializedObject.FindProperty("entityType");

            subEntity         = serializedObject.FindProperty("subEntity");
            parentEntity      = serializedObject.FindProperty("parentEntity");
            isInvulnerable    = serializedObject.FindProperty("isInvulnerable");
            invulnerableSpawn = serializedObject.FindProperty("invulnerableSpawn");
            randomLife        = serializedObject.FindProperty("randomLife");
            rndMinLife        = serializedObject.FindProperty("rndMinLife");
            rndMaxLife        = serializedObject.FindProperty("rndMaxLife");
            life              = serializedObject.FindProperty("maxLife");
            scorePoint        = serializedObject.FindProperty("scorePoint");
            isPooled          = serializedObject.FindProperty("isPooled");
            isExternalEndLife = serializedObject.FindProperty("isExternalEndLife");

            isCollisionDamage = serializedObject.FindProperty("doDamageOnCollision");
            damageNature      = serializedObject.FindProperty("damageNature");
            damagePoint       = serializedObject.FindProperty("damagePoint");
            damageThreshold   = serializedObject.FindProperty("damageThreshold");
            useTrigger        = serializedObject.FindProperty("useTrigger");

            addForceFromImpact = serializedObject.FindProperty("addForceFromImpact");
            damagesSensitivity = serializedObject.FindProperty("damagesSensitivity");

            spawnEffect = serializedObject.FindProperty("spawnEffects");
            hitEffect   = serializedObject.FindProperty("hitEffects");
            healEffect  = serializedObject.FindProperty("healEffects");
            deathEffect = serializedObject.FindProperty("deathEffects");

            spawnEffectOffset = serializedObject.FindProperty("spawnEffectOffset");
            healEffectOffset  = serializedObject.FindProperty("healEffectOffset");
            hitEffectOffset   = serializedObject.FindProperty("hitEffectOffset");
            deathEffectOffset = serializedObject.FindProperty("deathEffectOffset");

            onHit           = serializedObject.FindProperty("onHit");
            onEntitySpawn   = serializedObject.FindProperty("onEntitySpawn");
            onHeal          = serializedObject.FindProperty("onHeal");
            onEntityDestroy = serializedObject.FindProperty("onEntityDestroy");

            showPropertie   = serializedObject.FindProperty("showPropertie");
            showDamage      = serializedObject.FindProperty("showDamage");
            showSensitivity = serializedObject.FindProperty("showSensitivity");
            showEffect      = serializedObject.FindProperty("showEffect");
            showEvent       = serializedObject.FindProperty("showEvent");

            // Faction
            factions = CoreShooterKitEditor.GetAllFaction();
            Array.Resize <string>(ref factionLabels, factions.Length);
            for (int i = 0; i < factions.Length; i++)
            {
                factionLabels[i] = factions[i].name;
            }

            // Damage type
            GameEntity   t             = (GameEntity)target;
            DamageNature damagesNature = CoreShooterKitEditor.GetDamageNature();

            if (damagesNature != null)
            {
                damageLabels = damagesNature.damageNatures;

                int size = damagesSensitivity.arraySize;
                Array.Resize <float>(ref t.damagesSensitivity, damageLabels.Length);
                if (size == 0)
                {
                    for (int i = 0; i < damageLabels.Length; i++)
                    {
                        t.damagesSensitivity[i] = 1;
                    }
                }
            }
            else
            {
                Debug.LogWarning("The nature of damage doesn't exit");
            }


            // update faction
            for (int i = 0; i < factions.Length; i++)
            {
                if (faction.objectReferenceValue == factions[i])
                {
                    factionIndex = i;
                }
            }
        }