Exemplo n.º 1
0
 private void ProjectileRange(ProbeChargedShot shot)
 {
     shot.ProjectileRange = EditorGUILayout.Slider(
         new GUIContent(
             "Projectile Range",
             "Maximum range of the projectile."),
         shot.ProjectileRange,
         20f,
         500f);
 }
Exemplo n.º 2
0
 private void CooldownField(ProbeChargedShot shot)
 {
     shot.CooldownTime = EditorGUILayout.Slider(
         new GUIContent(
             "Cooldown Time",
             "Time required between shots, in seconds. Minimum is 0.001s."),
         shot.CooldownTime,
         shot.MinimumCooldown,
         4);
 }
Exemplo n.º 3
0
    private void ChargeMenu(ProbeChargedShot shot)
    {
        showCharge = EditorGUILayout.Foldout(showCharge, "Charge");
        if (showCharge)
        {
            EditorGUI.indentLevel++;

            shot.MaxChargeTime = EditorGUILayout.Slider(
                new GUIContent(
                    "Max Charge Time",
                    "The maximum effective charge time."),
                shot.MaxChargeTime,
                0,
                10);

            shot.ChargeDamage = EditorGUILayout.Slider(
                new GUIContent(
                    "Damage",
                    "The amount of damage added at maximum charge."),
                shot.ChargeDamage,
                0,
                100);

            shot.ChargeMass = EditorGUILayout.Slider(
                new GUIContent(
                    "Mass",
                    "The amount of mass added at maximum charge."),
                shot.ChargeMass,
                0,
                50);

            shot.ChargeSize = EditorGUILayout.Slider(
                new GUIContent(
                    "Size",
                    "The amount of size added at maximum charge."),
                shot.ChargeSize,
                0,
                10);

            shot.ChargeForce = EditorGUILayout.Slider(
                new GUIContent(
                    "Force",
                    "The amount of size added at maximum charge."),
                shot.ChargeForce,
                0,
                1000);

            EditorGUILayout.LabelField("Charging", shot.Charging.ToString());

            EditorGUI.indentLevel--;
        }
    }
Exemplo n.º 4
0
 private void HomingMenu(ProbeChargedShot shot)
 {
     showHoming = EditorGUILayout.Foldout(showHoming, "Homing");
     if (showHoming)
     {
         EditorGUI.indentLevel++;
         shot.ProjectileHomingRadius = EditorGUILayout.FloatField(
             "Radius", shot.ProjectileHomingRadius);
         shot.ProjectileHomingForce = EditorGUILayout.FloatField(
             "Force", shot.ProjectileHomingForce);
         EditorGUI.indentLevel--;
     }
 }
Exemplo n.º 5
0
    private void ChargeMenu(ProbeChargedShot shot){
        showCharge = EditorGUILayout.Foldout(showCharge, "Charge");
        if(showCharge){
            EditorGUI.indentLevel++;

            shot.MaxChargeTime = EditorGUILayout.Slider(
                    new GUIContent(
                        "Max Charge Time",
                        "The maximum effective charge time."),
                    shot.MaxChargeTime,
                    0,
                    10);

            shot.ChargeDamage = EditorGUILayout.Slider(
                    new GUIContent(
                        "Damage",
                        "The amount of damage added at maximum charge."),
                    shot.ChargeDamage,
                    0,
                    100);

            shot.ChargeMass = EditorGUILayout.Slider(
                    new GUIContent(
                        "Mass",
                        "The amount of mass added at maximum charge."),
                    shot.ChargeMass,
                    0,
                    50);

            shot.ChargeSize = EditorGUILayout.Slider(
                    new GUIContent(
                        "Size",
                        "The amount of size added at maximum charge."),
                    shot.ChargeSize,
                    0,
                    10);

            shot.ChargeForce = EditorGUILayout.Slider(
                    new GUIContent(
                        "Force",
                        "The amount of size added at maximum charge."),
                    shot.ChargeForce,
                    0,
                    1000);

            EditorGUILayout.LabelField("Charging", shot.Charging.ToString());

            EditorGUI.indentLevel--;
        }
    }
Exemplo n.º 6
0
    private void PreChargeMenu(ProbeChargedShot shot)
    {
        showPreCharge = EditorGUILayout.Foldout(showPreCharge, "Pre-charge");
        if (showPreCharge)
        {
            EditorGUI.indentLevel++;

            shot.EnergyCost = EditorGUILayout.FloatField(
                "Energy Cost", shot.EnergyCost);


            shot.WeaponDamage = EditorGUILayout.FloatField(
                "Weapon Damage", shot.WeaponDamage);

            shot.ProjectileMass = EditorGUILayout.Slider(
                new GUIContent(
                    "Mass",
                    "Mass of projectile at zero charge."),
                shot.ProjectileMass,
                0.1f,
                5f);

            shot.ProjectileSize = EditorGUILayout.Slider(
                new GUIContent(
                    "Size",
                    "Size of projectile at zero charge."),
                shot.ProjectileSize,
                0.1f,
                10f);

            shot.ProjectileForce = EditorGUILayout.Slider(
                new GUIContent(
                    "Force",
                    "Force of projectile at zero charge."),
                shot.ProjectileForce,
                0.1f,
                1000f);

            EditorGUI.indentLevel--;
        }
    }
Exemplo n.º 7
0
    private void PreChargeMenu(ProbeChargedShot shot){
        showPreCharge = EditorGUILayout.Foldout(showPreCharge, "Pre-charge");
        if(showPreCharge){
            EditorGUI.indentLevel++;
            
            shot.EnergyCost = EditorGUILayout.FloatField(
                    "Energy Cost", shot.EnergyCost);


            shot.WeaponDamage = EditorGUILayout.FloatField(
                    "Weapon Damage", shot.WeaponDamage);

            shot.ProjectileMass = EditorGUILayout.Slider(
                    new GUIContent(
                        "Mass",
                        "Mass of projectile at zero charge."),
                    shot.ProjectileMass,
                    0.1f,
                    5f);

            shot.ProjectileSize = EditorGUILayout.Slider(
                    new GUIContent(
                        "Size",
                        "Size of projectile at zero charge."),
                    shot.ProjectileSize,
                    0.1f,
                    10f);

            shot.ProjectileForce = EditorGUILayout.Slider(
                    new GUIContent(
                        "Force",
                        "Force of projectile at zero charge."),
                    shot.ProjectileForce,
                    0.1f,
                    1000f);

            EditorGUI.indentLevel--;
        }
    }
Exemplo n.º 8
0
    public override void OnInspectorGUI()
    {
        ProbeChargedShot shot = (ProbeChargedShot)target;

        EditorGUILayout.LabelField("Active", shot.Active.ToString());

        EditorGUILayout.LabelField("Cooldown Ready", shot.CooldownReady.ToString());

        shot.left = EditorGUILayout.Toggle("Left", shot.left);

        CooldownField(shot);

        PreChargeMenu(shot);

        ChargeMenu(shot);

        HomingMenu(shot);

        ProjectileColor(shot);

        ProjectileRange(shot);
    }
Exemplo n.º 9
0
 private void ProjectileRange(ProbeChargedShot shot){
 	shot.ProjectileRange = EditorGUILayout.Slider(
 		new GUIContent(
 			"Projectile Range",
 			"Maximum range of the projectile."),
 		shot.ProjectileRange,
 		20f,
 		500f);
 }
Exemplo n.º 10
0
 private void ProjectileColor(ProbeChargedShot shot){
     shot.ProjectileColor = colors[EditorGUILayout.Popup(
             "Projectile Color", colorDict[shot.ProjectileColor], colors)];
 }
Exemplo n.º 11
0
 private void HomingMenu(ProbeChargedShot shot){
     showHoming = EditorGUILayout.Foldout(showHoming, "Homing");
     if(showHoming){
         EditorGUI.indentLevel++;
         shot.ProjectileHomingRadius = EditorGUILayout.FloatField(
                 "Radius", shot.ProjectileHomingRadius);
         shot.ProjectileHomingForce = EditorGUILayout.FloatField(
                 "Force", shot.ProjectileHomingForce);
         EditorGUI.indentLevel--;
     }
 }
Exemplo n.º 12
0
 private void CooldownField(ProbeChargedShot shot){
     shot.CooldownTime = EditorGUILayout.Slider(
             new GUIContent(
                 "Cooldown Time",
                 "Time required between shots, in seconds. Minimum is 0.001s."),
             shot.CooldownTime,
             shot.MinimumCooldown,
             4);
 }
Exemplo n.º 13
0
 private void ProjectileColor(ProbeChargedShot shot)
 {
     shot.ProjectileColor = colors[EditorGUILayout.Popup(
                                       "Projectile Color", colorDict[shot.ProjectileColor], colors)];
 }