Example #1
0
    void Start()
    {
        wepControl   = GameObject.Find("Player").GetComponent <PlayerWepControl> ();
        spellControl = GameObject.Find("Player").GetComponent <PlayerSpellControl> ();
        mover        = GameObject.Find("Player").GetComponent <PlayerMove> ();
        wepSize      = GameObject.Find("Player").GetComponent <WeaponSize> ();
        mouseLook    = GameObject.Find("Player").GetComponentInChildren <SimpleSmoothMouseLook> ();

        bladeRenderer  = GameObject.Find("Player").transform.Find("CharacterHead").Find("RightWep").Find("RightWepBlade").GetComponent <Renderer>();
        handleRenderer = GameObject.Find("Player").transform.Find("CharacterHead").Find("RightWep").Find("RightWepHandle").GetComponent <Renderer>();

        headSlider   = transform.Find("HeadSizeSlider").GetComponent <Slider> ();
        handleSlider = transform.Find("HandleSizeSlider").GetComponent <Slider> ();
        typeDrop     = transform.Find("TypeDropdown").GetComponent <Dropdown> ();
        statText     = transform.Find("StatIndicator").GetComponent <Text> ();

        Transform colorStuff = transform.Find("ColorCustomizers");

        bladeRedSlider   = colorStuff.Find("BladeRedSlider").GetComponent <Slider>();
        bladeGreenSlider = colorStuff.Find("BladeGreenSlider").GetComponent <Slider>();
        bladeBlueSlider  = colorStuff.Find("BladeBlueSlider").GetComponent <Slider>();
        bladeColorImage  = colorStuff.Find("BladeColorImage").GetComponent <Image>();

        handleRedSlider   = colorStuff.Find("HandleRedSlider").GetComponent <Slider>();
        handleGreenSlider = colorStuff.Find("HandleGreenSlider").GetComponent <Slider>();
        handleBlueSlider  = colorStuff.Find("HandleBlueSlider").GetComponent <Slider>();
        handleColorImage  = colorStuff.Find("HandleColorImage").GetComponent <Image>();
    }
Example #2
0
    void Start()
    {
        Transform sliders = transform.Find ("Sliders");

        armor = GameObject.Find ("Player").GetComponent<CharacterStats> ().armor;

        wepControl = GameObject.Find ("Player").GetComponent<PlayerWepControl> ();
        spellControl = GameObject.Find ("Player").GetComponent<PlayerSpellControl> ();
        mover = GameObject.Find ("Player").GetComponent<PlayerMove> ();
        mouseLook = GameObject.Find ("Player").GetComponentInChildren<SimpleSmoothMouseLook> ();

        playerRenderer = GameObject.Find ("Player").transform.Find ("Graphics").GetComponent<Renderer> ();

        maxHealthSlider = sliders.Find ("MaxHealthSlider").GetComponent<Slider> ();
        healthRegenSlider = sliders.Find ("HealthRegenSlider").GetComponent<Slider> ();
        damageReductionSlider = sliders.Find ("DamageReductionSlider").GetComponent<Slider> ();
        maxManaSlider = sliders.Find ("MaxManaSlider").GetComponent<Slider> ();
        manaRegenSlider = sliders.Find ("ManaRegenSlider").GetComponent<Slider> ();
        damageSlider = sliders.Find ("DamageSlider").GetComponent<Slider> ();
        attackTimeSlider = sliders.Find ("AttackTimeSlider").GetComponent<Slider> ();
        knockbackSlider = sliders.Find ("KnockbackSlider").GetComponent<Slider> ();
        speedSlider = sliders.Find ("SpeedSlider").GetComponent<Slider> ();
        jumpSpeedSlider = sliders.Find ("JumpSpeedSlider").GetComponent<Slider> ();

        redSlider = transform.Find ("ColorCustomizers").Find ("RedSlider").GetComponent<Slider> ();
        greenSlider = transform.Find ("ColorCustomizers").Find ("GreenSlider").GetComponent<Slider> ();
        blueSlider = transform.Find ("ColorCustomizers").Find ("BlueSlider").GetComponent<Slider> ();

        colorImage = transform.Find ("ColorCustomizers").Find ("ColorImage").GetComponent<Image> ();

        pointsLeftTxt = transform.Find ("PointsLeft").GetComponent<Text>();
    }
Example #3
0
    void Start()
    {
        Transform sliders = transform.Find("Sliders");

        armor = GameObject.Find("Player").GetComponent <CharacterStats> ().armor;

        wepControl   = GameObject.Find("Player").GetComponent <PlayerWepControl> ();
        spellControl = GameObject.Find("Player").GetComponent <PlayerSpellControl> ();
        mover        = GameObject.Find("Player").GetComponent <PlayerMove> ();
        mouseLook    = GameObject.Find("Player").GetComponentInChildren <SimpleSmoothMouseLook> ();

        playerRenderer = GameObject.Find("Player").transform.Find("Graphics").GetComponent <Renderer> ();

        maxHealthSlider       = sliders.Find("MaxHealthSlider").GetComponent <Slider> ();
        healthRegenSlider     = sliders.Find("HealthRegenSlider").GetComponent <Slider> ();
        damageReductionSlider = sliders.Find("DamageReductionSlider").GetComponent <Slider> ();
        maxManaSlider         = sliders.Find("MaxManaSlider").GetComponent <Slider> ();
        manaRegenSlider       = sliders.Find("ManaRegenSlider").GetComponent <Slider> ();
        damageSlider          = sliders.Find("DamageSlider").GetComponent <Slider> ();
        attackTimeSlider      = sliders.Find("AttackTimeSlider").GetComponent <Slider> ();
        knockbackSlider       = sliders.Find("KnockbackSlider").GetComponent <Slider> ();
        speedSlider           = sliders.Find("SpeedSlider").GetComponent <Slider> ();
        jumpSpeedSlider       = sliders.Find("JumpSpeedSlider").GetComponent <Slider> ();

        redSlider   = transform.Find("ColorCustomizers").Find("RedSlider").GetComponent <Slider> ();
        greenSlider = transform.Find("ColorCustomizers").Find("GreenSlider").GetComponent <Slider> ();
        blueSlider  = transform.Find("ColorCustomizers").Find("BlueSlider").GetComponent <Slider> ();

        colorImage = transform.Find("ColorCustomizers").Find("ColorImage").GetComponent <Image> ();

        pointsLeftTxt = transform.Find("PointsLeft").GetComponent <Text>();
    }
Example #4
0
    void Start()
    {
        wepControl = GameObject.Find ("Player").GetComponent<PlayerWepControl> ();
        spellControl = GameObject.Find ("Player").GetComponent<PlayerSpellControl> ();
        mover = GameObject.Find ("Player").GetComponent<PlayerMove> ();
        wepSize = GameObject.Find ("Player").GetComponent<WeaponSize> ();
        mouseLook = GameObject.Find ("Player").GetComponentInChildren<SimpleSmoothMouseLook> ();

        bladeRenderer = GameObject.Find ("Player").transform.Find ("CharacterHead").Find ("RightWep").Find ("RightWepBlade").GetComponent<Renderer>();
        handleRenderer = GameObject.Find ("Player").transform.Find ("CharacterHead").Find ("RightWep").Find ("RightWepHandle").GetComponent<Renderer>();

        headSlider = transform.Find ("HeadSizeSlider").GetComponent<Slider> ();
        handleSlider = transform.Find ("HandleSizeSlider").GetComponent<Slider> ();
        typeDrop = transform.Find ("TypeDropdown").GetComponent<Dropdown> ();
        statText = transform.Find ("StatIndicator").GetComponent<Text> ();

        Transform colorStuff = transform.Find ("ColorCustomizers");

        bladeRedSlider = colorStuff.Find ("BladeRedSlider").GetComponent<Slider>();
        bladeGreenSlider = colorStuff.Find ("BladeGreenSlider").GetComponent<Slider>();
        bladeBlueSlider = colorStuff.Find ("BladeBlueSlider").GetComponent<Slider>();
        bladeColorImage = colorStuff.Find ("BladeColorImage").GetComponent<Image>();

        handleRedSlider = colorStuff.Find ("HandleRedSlider").GetComponent<Slider>();
        handleGreenSlider = colorStuff.Find ("HandleGreenSlider").GetComponent<Slider>();
        handleBlueSlider = colorStuff.Find ("HandleBlueSlider").GetComponent<Slider>();
        handleColorImage = colorStuff.Find ("HandleColorImage").GetComponent<Image>();
    }
Example #5
0
    void Start()
    {
        spell = GameObject.Find("Player").GetComponent <CharacterSpellControl> ().spell;

        wepControl   = GameObject.Find("Player").GetComponent <PlayerWepControl> ();
        spellControl = GameObject.Find("Player").GetComponent <PlayerSpellControl> ();
        mover        = GameObject.Find("Player").GetComponent <PlayerMove> ();
        mouseLook    = GameObject.Find("Player").GetComponentInChildren <SimpleSmoothMouseLook> ();

        //Parent elements for easy enabling/disabling
        effectSliders        = transform.Find("EffectSliders");
        effectLabels         = transform.Find("EffectLabels");
        projectileSliders    = transform.Find("ProjectileSliders");
        projectileLabels     = transform.Find("ProjectileLabels");
        projectileCheckboxes = transform.Find("ProjectileCheckboxes");

        //Effect Sliders
        maxHealthSlider        = effectSliders.Find("MaxHealthSlider").GetComponent <Slider> ();
        healthRegenSlider      = effectSliders.Find("HealthRegenSlider").GetComponent <Slider> ();
        damageReductionSlider  = effectSliders.Find("DamageReductionSlider").GetComponent <Slider> ();
        maxManaSlider          = effectSliders.Find("MaxManaSlider").GetComponent <Slider> ();
        manaRegenSlider        = effectSliders.Find("ManaRegenSlider").GetComponent <Slider> ();
        damageSlider           = effectSliders.Find("DamageSlider").GetComponent <Slider> ();
        attackTimeSlider       = effectSliders.Find("AttackTimeSlider").GetComponent <Slider> ();
        knockbackSlider        = effectSliders.Find("KnockbackSlider").GetComponent <Slider> ();
        speedSlider            = effectSliders.Find("SpeedSlider").GetComponent <Slider> ();
        jumpSpeedSlider        = effectSliders.Find("JumpSpeedSlider").GetComponent <Slider> ();
        instantDamageSlider    = effectSliders.Find("InstantDamageSlider").GetComponent <Slider> ();
        instantKnockbackSlider = effectSliders.Find("InstantKnockbackSlider").GetComponent <Slider> ();
        durationSlider         = effectSliders.Find("DurationSlider").GetComponent <Slider> ();

        //Effect Labels
        durationLabel = effectLabels.Find("DurationLabel").GetComponent <Text> ();

        //Projectile Sliders
        projectileSpeedSlider = projectileSliders.Find("ProjectileSpeedSlider").GetComponent <Slider>();
        radiusSlider          = projectileSliders.Find("RadiusSlider").GetComponent <Slider> ();
        lifetimeSlider        = projectileSliders.Find("LifetimeSlider").GetComponent <Slider> ();
        sizeSlider            = projectileSliders.Find("SizeSlider").GetComponent <Slider> ();
        redSlider             = projectileSliders.Find("RedSlider").GetComponent <Slider> ();
        greenSlider           = projectileSliders.Find("GreenSlider").GetComponent <Slider> ();
        blueSlider            = projectileSliders.Find("BlueSlider").GetComponent <Slider> ();

        //Projectile Checkboxes
        targetToggle      = projectileCheckboxes.Find("TargetsEnemies").GetComponent <Toggle> ();
        self              = projectileCheckboxes.Find("Self").GetComponent <Toggle> ();
        affectedByGravity = projectileCheckboxes.Find("Gravity").GetComponent <Toggle> ();
        AoE = projectileCheckboxes.Find("AoE").GetComponent <Toggle> ();

        //Projectile Labels (and an image)
        lifetimeLabel = projectileLabels.Find("LifetimeLabel").GetComponent <Text>();
        colorImage    = projectileLabels.Find("ColorImage").GetComponent <Image> ();

        //Cost is its own thing, not parented to anything. It always shows up
        costLabel = transform.Find("CostLabel").GetComponent <Text> ();

        //Activate one of the menus so we don't get overlap
        ActivateEffectsMenu();
    }
Example #6
0
    void Start()
    {
        rightWep     = transform.Find("CharacterHead").Find("RightWep").gameObject;
        leftSpell    = transform.Find("CharacterHead").Find("LeftSpell").gameObject;
        wepControl   = GetComponent <PlayerWepControl> ();
        spellControl = GetComponent <PlayerSpellControl> ();
        playerBuild  = GetComponentInChildren <PlayerBuild> ();

        blockText = GameObject.Find("BlockText");

        WeaponMode();
    }
Example #7
0
    void Start()
    {
        rightWep = transform.Find ("CharacterHead").Find ("RightWep").gameObject;
        leftSpell = transform.Find ("CharacterHead").Find ("LeftSpell").gameObject;
        wepControl = GetComponent<PlayerWepControl> ();
        spellControl = GetComponent<PlayerSpellControl> ();
        playerBuild = GetComponentInChildren<PlayerBuild> ();

        blockText = GameObject.Find ("BlockText");

        WeaponMode ();
    }
Example #8
0
    void Start()
    {
        charHead = transform.Find("CharacterHead");

        wepCustomizerPanel = GameObject.Find("WeaponCustomizerPanel");
        wepCustomizerPanel.SetActive(false);

        armorCustomizerPanel = GameObject.Find("ArmorCustomizerPanel");
        armorCustomizerPanel.SetActive(false);

        spellCustomizerPanel = GameObject.Find("SpellCustomizerPanel");
        spellCustomizerPanel.SetActive(false);

        mover        = GetComponent <PlayerMove> ();
        mouseLook    = GetComponentInChildren <SimpleSmoothMouseLook> ();
        wepControl   = GetComponent <PlayerWepControl> ();
        spellControl = GetComponent <PlayerSpellControl> ();

        state = GameObject.Find("GameLogicScripts").GetComponent <GameState> ();
    }
Example #9
0
    void Start()
    {
        charHead = transform.Find ("CharacterHead");

        wepCustomizerPanel = GameObject.Find ("WeaponCustomizerPanel");
        wepCustomizerPanel.SetActive (false);

        armorCustomizerPanel = GameObject.Find ("ArmorCustomizerPanel");
        armorCustomizerPanel.SetActive (false);

        spellCustomizerPanel = GameObject.Find ("SpellCustomizerPanel");
        spellCustomizerPanel.SetActive (false);

        mover = GetComponent<PlayerMove> ();
        mouseLook = GetComponentInChildren<SimpleSmoothMouseLook> ();
        wepControl = GetComponent<PlayerWepControl> ();
        spellControl = GetComponent<PlayerSpellControl> ();

        state = GameObject.Find ("GameLogicScripts").GetComponent<GameState> ();
    }
Example #10
0
    void Start()
    {
        spell = GameObject.Find ("Player").GetComponent<CharacterSpellControl> ().spell;

        wepControl = GameObject.Find ("Player").GetComponent<PlayerWepControl> ();
        spellControl = GameObject.Find ("Player").GetComponent<PlayerSpellControl> ();
        mover = GameObject.Find ("Player").GetComponent<PlayerMove> ();
        mouseLook = GameObject.Find ("Player").GetComponentInChildren<SimpleSmoothMouseLook> ();

        //Parent elements for easy enabling/disabling
        effectSliders = transform.Find("EffectSliders");
        effectLabels = transform.Find ("EffectLabels");
        projectileSliders = transform.Find ("ProjectileSliders");
        projectileLabels = transform.Find ("ProjectileLabels");
        projectileCheckboxes = transform.Find ("ProjectileCheckboxes");

        //Effect Sliders
        maxHealthSlider = effectSliders.Find ("MaxHealthSlider").GetComponent<Slider> ();
        healthRegenSlider = effectSliders.Find ("HealthRegenSlider").GetComponent<Slider> ();
        damageReductionSlider = effectSliders.Find ("DamageReductionSlider").GetComponent<Slider> ();
        maxManaSlider = effectSliders.Find ("MaxManaSlider").GetComponent<Slider> ();
        manaRegenSlider = effectSliders.Find ("ManaRegenSlider").GetComponent<Slider> ();
        damageSlider = effectSliders.Find ("DamageSlider").GetComponent<Slider> ();
        attackTimeSlider = effectSliders.Find ("AttackTimeSlider").GetComponent<Slider> ();
        knockbackSlider = effectSliders.Find ("KnockbackSlider").GetComponent<Slider> ();
        speedSlider = effectSliders.Find ("SpeedSlider").GetComponent<Slider> ();
        jumpSpeedSlider = effectSliders.Find ("JumpSpeedSlider").GetComponent<Slider> ();
        instantDamageSlider = effectSliders.Find ("InstantDamageSlider").GetComponent<Slider> ();
        instantKnockbackSlider = effectSliders.Find ("InstantKnockbackSlider").GetComponent<Slider> ();
        durationSlider = effectSliders.Find ("DurationSlider").GetComponent<Slider> ();

        //Effect Labels
        durationLabel = effectLabels.Find ("DurationLabel").GetComponent<Text> ();

        //Projectile Sliders
        projectileSpeedSlider = projectileSliders.Find ("ProjectileSpeedSlider").GetComponent<Slider>();
        radiusSlider = projectileSliders.Find ("RadiusSlider").GetComponent<Slider> ();
        lifetimeSlider = projectileSliders.Find ("LifetimeSlider").GetComponent<Slider> ();
        sizeSlider = projectileSliders.Find ("SizeSlider").GetComponent<Slider> ();
        redSlider = projectileSliders.Find ("RedSlider").GetComponent<Slider> ();
        greenSlider = projectileSliders.Find ("GreenSlider").GetComponent<Slider> ();
        blueSlider = projectileSliders.Find ("BlueSlider").GetComponent<Slider> ();

        //Projectile Checkboxes
        targetToggle = projectileCheckboxes.Find ("TargetsEnemies").GetComponent<Toggle> ();
        self = projectileCheckboxes.Find ("Self").GetComponent<Toggle> ();
        affectedByGravity = projectileCheckboxes.Find ("Gravity").GetComponent<Toggle> ();
        AoE = projectileCheckboxes.Find ("AoE").GetComponent<Toggle> ();

        //Projectile Labels (and an image)
        lifetimeLabel = projectileLabels.Find("LifetimeLabel").GetComponent<Text>();
        colorImage = projectileLabels.Find ("ColorImage").GetComponent<Image> ();

        //Cost is its own thing, not parented to anything. It always shows up
        costLabel = transform.Find ("CostLabel").GetComponent<Text> ();

        //Activate one of the menus so we don't get overlap
        ActivateEffectsMenu ();
    }