//DannyWeaponScript dannyWeaponScript;


    // Use this for initialization
    void Start()
    {
        SetupAnimator();
        rigidBody  = GetComponent <Rigidbody> ();
        sUinput    = GetComponent <StrongManUserInput>();
        jumpScript = GetComponent <StrongManJumpingRaycast> ();
        //get the component needed to raise and lower the moveSpeedmultiplier variable
    }
Esempio n. 2
0
 void OnCollisionEnter(Collision hitIt)
 {
     if (hitIt.gameObject.tag == "Player")
     {
         sUinput = hitIt.gameObject.GetComponent <StrongManUserInput> ();
         if (sUinput != null && !sUinput.landedOn)
         {
             sUinput.headedTo = false;
             sUinput.landedOn = true;
         }
         onSite = true;
     }
 }
Esempio n. 3
0
    void Start()
    {
        //pos = transform;
        rigidBody   = GetComponent <Rigidbody>();
        dannyM      = GetComponent <DannyMovement> ();
        charMove    = GetComponent <StrongManMovement>();
        jumpCol     = GetComponent <CapsuleCollider> ();
        sUinput     = GetComponent <StrongManUserInput> ();
        anim        = GetComponent <Animator>();
        jumpCounter = 2f;
//		cam = Camera.main;

        colNormHeight = jumpCol.height;
    }
Esempio n. 4
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         sUinput = other.gameObject.GetComponent <StrongManUserInput> ();
         if (sUinput != null)
         {
             sUinput.moveTotarget = false;
             sUinput.headedTo     = false;
             sUinput.landedOn     = true;
             sUinput.target       = null;
             sUinput.currentLedge = thisLedge;
         }
     }
 }
    void Start()
    {
        pos       = transform;
        rigidBody = GetComponent <Rigidbody>();
        dannyM    = GetComponent <DannyMovement> ();
        charMove  = GetComponent <StrongManMovement>();

        userInput   = GetComponent <UserInput>();
        sUinput     = GetComponent <StrongManUserInput> ();
        anim        = GetComponent <Animator>();
        jumpCounter = 2f;
        sphereCol   = GetComponent <SphereCollider> ();
        cam         = Camera.main;
        spawnAlly1  = cam.GetComponent <BlockAllySpawn>();
    }
Esempio n. 6
0
//	PlayerHealth1 playerHealth;
    //DannyWeaponScript dannyWeaponScript;


    // Use this for initialization
    void Start()
    {
        SetupAnimator();
        rigidBody = GetComponent <Rigidbody> ();
        userInput = GetComponent <UserInput>();
        sUinput   = GetComponent <StrongManUserInput>();
        //get the component needed to raise and lower the moveSpeedmultiplier variable
//		hudSpeedCheck = HUDSpeedBooster.speedAmount;
//		playerHealth = GetComponent<PlayerHealth1> ();


        if (blazeSwordObject != null)
        {
            setBlazeSword = blazeSwordObject.GetComponent <PlayerBowStaff>();
        }

        //dannyWeaponScript = GetComponent<DannyWeaponScript>();
    }
Esempio n. 7
0
    void Start()
    {
        GameMasterObject.timerChecks.Add(myTransform);
        GameMasterObject.timerChecksToDestroy.Add(this.gameObject);
        player    = GameMasterObject.playerUse;
        userInput = player.GetComponent <UserInput> ();
        sUinput   = player.GetComponent <StrongManUserInput> ();

        if (sUinput == null && userInput != null)
        {
            needDanny     = true;
            needStrongman = false;
        }
        else if (sUinput != null && userInput == null)
        {
            needStrongman = true;
            needDanny     = false;
        }
    }
Esempio n. 8
0
    void Awake()
    {
//		anim = GetComponent<Animator>();
//		playerAudio = GetComponent<AudioSource>();
        dannyWeapons  = GetComponent <DannyWeaponScript> ();
        dannyMovement = GetComponent <DannyMovement>();
        charMove      = GetComponent <StrongManMovement> ();
        userInput     = GetComponent <UserInput> ();
        sUinput       = GetComponent <StrongManUserInput>();

        if (displayModel != null)
        {
            rend = displayModel.GetComponent <Renderer>();
        }

        currentHealth = startingHealth;
        countPower    = startingPower;
        maxHealth     = startingHealth;
        maxPower      = startingPower;

        regColor = rend.material.color;
    }
 void Awake()
 {
     sUinput = GetComponentInParent <StrongManUserInput> ();
 }
Esempio n. 10
0
    void Update()
    {
        editorCheatCode = HUDToggleCheat.cheatOnOrOff;
        if (needDanny)
        {
            rendTag.material.color = Color.green;
        }
        else if (needStrongman)
        {
            rendTag.material.color = Color.red;
        }

        targets = GameMasterObject.towerExits;
        player  = GameMasterObject.playerUse;

        if (GameMasterObject.currentLevel >= 4 || editorCheatCode)
        {
            if (GameMasterObject.dannyActive && userInput == null)
            {
                userInput     = player.GetComponent <UserInput> ();
                sUinput       = null;
                needDanny     = true;
                needStrongman = false;
            }
            else if (GameMasterObject.strongmanActive && sUinput == null)
            {
                userInput     = null;
                sUinput       = player.GetComponent <StrongManUserInput> ();
                needDanny     = false;
                needStrongman = true;
            }
        }

        if (hitchARide)
        {
            anim.SetBool("Hitch", true);
        }
        else if (!hitchARide)
        {
            anim.SetBool("Hitch", false);
        }
        if (userInput != null)
        {
            if (userInput.canPickUp && GameMasterObject.dannyActive)
            {
                if (!userInput.currentlyCarry1 && !userInput.currentlyCarry2)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        userInput.objToCarry.SetActive(true);
                        userInput.objectToDeactivate = this.gameObject;
                        userInput.objectToDeactivate.SetActive(false);
                        userInput.objectToDeactivate = null;
                        userInput.canPickUp          = false;
                        userInput.currentlyCarry1    = true;
                    }
                }
                else if (userInput.currentlyCarry1 && !userInput.currentlyCarry2)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        userInput.objToCarry2.SetActive(true);
                        userInput.objectToDeactivate2 = this.gameObject;
                        userInput.objectToDeactivate2.SetActive(false);
                        userInput.objectToDeactivate2 = null;
                        userInput.canPickUp           = false;
                        userInput.currentlyCarry2     = true;
                    }
                }
                else if (userInput.currentlyCarry1 && userInput.currentlyCarry2)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        return;
                    }
                }
            }
        }
        else if (sUinput != null)
        {
            if (sUinput.canPickUp && GameMasterObject.strongmanActive)
            {
                if (!sUinput.currentlyCarry1 && !sUinput.currentlyCarry2 && !sUinput.currentlyCarry3 && !sUinput.currentlyCarry4 && !sUinput.currentlyCarry5 && !sUinput.currentlyCarry6)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        sUinput.objToCarry.SetActive(true);
                        sUinput.objectToDeactivate = this.gameObject;
                        sUinput.objectToDeactivate.SetActive(false);
                        sUinput.objectToDeactivate = null;
                        sUinput.canPickUp          = false;
                        sUinput.currentlyCarry1    = true;
                    }
                }
                else if (sUinput.currentlyCarry1 && !sUinput.currentlyCarry2 && !sUinput.currentlyCarry3 && !sUinput.currentlyCarry4 && !sUinput.currentlyCarry5 && !sUinput.currentlyCarry6)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        sUinput.objToCarry2.SetActive(true);
                        sUinput.objectToDeactivate2 = this.gameObject;
                        sUinput.objectToDeactivate2.SetActive(false);
                        sUinput.objectToDeactivate2 = null;
                        sUinput.canPickUp           = false;
                        sUinput.currentlyCarry2     = true;
                    }
                }
                else if (sUinput.currentlyCarry1 && sUinput.currentlyCarry2 && !sUinput.currentlyCarry3 && !sUinput.currentlyCarry4 && !sUinput.currentlyCarry5 && !sUinput.currentlyCarry6)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        sUinput.objToCarry3.SetActive(true);
                        sUinput.objectToDeactivate3 = this.gameObject;
                        sUinput.objectToDeactivate3.SetActive(false);
                        sUinput.objectToDeactivate3 = null;
                        sUinput.canPickUp           = false;
                        sUinput.currentlyCarry3     = true;
                    }
                }
                else if (sUinput.currentlyCarry1 && sUinput.currentlyCarry2 && sUinput.currentlyCarry3 && !sUinput.currentlyCarry4 && !sUinput.currentlyCarry5 && !sUinput.currentlyCarry6)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        sUinput.objToCarry4.SetActive(true);
                        sUinput.objectToDeactivate4 = this.gameObject;
                        sUinput.objectToDeactivate4.SetActive(false);
                        sUinput.objectToDeactivate4 = null;
                        sUinput.canPickUp           = false;
                        sUinput.currentlyCarry4     = true;
                    }
                }
                else if (sUinput.currentlyCarry1 && sUinput.currentlyCarry2 && sUinput.currentlyCarry3 && sUinput.currentlyCarry4 && !sUinput.currentlyCarry5 && !sUinput.currentlyCarry6)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        sUinput.objToCarry5.SetActive(true);
                        sUinput.objectToDeactivate5 = this.gameObject;
                        sUinput.objectToDeactivate5.SetActive(false);
                        sUinput.objectToDeactivate5 = null;
                        sUinput.canPickUp           = false;
                        sUinput.currentlyCarry5     = true;
                    }
                }
                else if (sUinput.currentlyCarry1 && sUinput.currentlyCarry2 && sUinput.currentlyCarry3 && sUinput.currentlyCarry4 && sUinput.currentlyCarry5 && !sUinput.currentlyCarry6)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        sUinput.objToCarry6.SetActive(true);
                        sUinput.objectToDeactivate6 = this.gameObject;
                        sUinput.objectToDeactivate6.SetActive(false);
                        sUinput.objectToDeactivate6 = null;
                        sUinput.canPickUp           = false;
                        sUinput.currentlyCarry6     = true;
                    }
                }
                else if (sUinput.currentlyCarry1 && sUinput.currentlyCarry2 && sUinput.currentlyCarry3 && sUinput.currentlyCarry4 && sUinput.currentlyCarry5 && sUinput.currentlyCarry6)
                {
                    if (Input.GetButtonDown("Interact") && hitchARide)
                    {
                        return;
                    }
                }
            }
        }
    }