Beispiel #1
0
 void Start()
 {
     if (!mouse)
     {
         inputManager = new InputManagerController();
     }
     player = GetComponentInParent <Character>();
     bobs   = transform.localPosition;
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        character = this.transform.parent.transform.parent.gameObject;

        if (!mouse)
        {
            inputManager = new InputManagerController();
        }
        else
        {
            inputManager = new InputManagerMouse();
        }
    }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     pauseCanvas = GameObject.Find("PauseCanvas");
     pauseCanvas.SetActive(false);
     deathCanvas = GameObject.Find("DeathCanvas");
     deathCanvas.SetActive(false);
     inputManagerM = new InputManagerMouse();
     inputManagerC = new InputManagerController();
     p1_hp         = GameObject.Find("P1_HPBar").GetComponent <Slider>();
     p2_hp         = GameObject.Find("P2_HPBar").GetComponent <Slider>();
     p1_tpcd       = GameObject.Find("P1_TPCD").GetComponent <Image>();
     p2_tpcd       = GameObject.Find("P2_TPCD").GetComponent <Image>();
     playersAlive  = 2;
     golemA        = GameObject.FindGameObjectsWithTag("Enemy");
     golem         = golemA[0].GetComponent <Golem>();
 }
Beispiel #4
0
    void Start()
    {
        if (!mouse)
        {
            inputManager   = new InputManagerController();
            hitBy2ndPlayer = 1;
            hitStatus      = 2;
            playercolor2nd = Color.red;
        }
        else
        {
            inputManager   = new InputManagerMouse();
            hitBy2ndPlayer = 2;
            hitStatus      = 1;
            playercolor2nd = Color.green;
        }
        effectToSpawn          = vfx[0];
        effectToSpawnStart     = vfx[1];
        effectToSpawnImplosion = vfx[2];
        Cursor.lockState       = CursorLockMode.Locked;
        charContr     = GetComponent <CharacterController>();
        currentMana   = maxMana;
        currentHealth = maxHealth;
        grav          = GetComponent <Gravity> ();
        grav.enabled  = false;
        mouseLook     = Camera.main.gameObject.GetComponent <camMouseLook> ();

        layerMask       = 1 << 8 | 1 << 2;
        layerMask       = ~layerMask;
        anim            = GetComponentInChildren <Animator>();
        ui_man          = FindObjectOfType <UI_Manager>();
        timeSinceDashed = dashCooldown;
        ppp             = GetComponentInChildren <PostProcessingBehaviour>().profile;
        //animDummy.SetFloat("AnimSpeed", 1f);
        //anim.SetFloat("AnimSpeed", 1f);
        //SendHPToUIMan();
    }