Exemple #1
0
 void Awake()
 {
     weaponControls = new WeaponControls();
     weaponControls.ShieldInputs.ShieldBash.performed += _ => ShieldBash();
     weaponControls.ShieldInputs.BlockStart.performed += _ => Block();
     weaponControls.ShieldInputs.BlockEnd.performed   += _ => Unblock();
 }
    public void Start()
    {
        _controls = ControlManager.Instance;

        _weapon   = GetComponentInChildren <WeaponControls>();
        _movement = GetComponent <MovementControls>();
    }
Exemple #3
0
    void Awake()
    {
        laserLine = GetComponent <LineRenderer>();

        weaponControls = new WeaponControls();
        weaponControls.GunInputs.Shoot.performed += _ => Shoot();
    }
Exemple #4
0
 // Start is called before the first frame update
 void Start()
 {
     rigid            = gameObject.GetComponent <Rigidbody2D>();
     collider         = gameObject.GetComponent <BoxCollider2D>();
     weaponController = GetComponentInChildren <WeaponControls>();
     // rigid.Sleep();
     //collider.enabled = false;
 }
 void Awake()
 {
     if (!isEnemy)
     {
         weaponControls = new WeaponControls();
         weaponControls.GunInputs.Shoot.performed += _ => Shoot();
     }
 }
Exemple #6
0
    private int layerMask = ~((1 << 10)); //shooting does not affect other bullets TODO fix this

    void Awake()
    {
        rigidBody        = GetComponent <Rigidbody>();
        originalRotation = transform.rotation;

        weaponControls = new WeaponControls();
        weaponControls.BoomerangInputs.Throw.performed += _ => Throw();
    }
    void Awake()
    {
        anim = GetComponent <Animation>();
        //hitSound = GetComponent<AudioSource>();

        weaponControls = new WeaponControls();
        weaponControls.SwordInputs.Swing.performed += _ => Swing();

        canSwing = true;
    }
Exemple #8
0
    void Awake()
    {
        rigidBody  = GetComponent <Rigidbody>();
        m_collider = GetComponent <Collider>();

        weaponControls = new WeaponControls();
        weaponControls.BananaInputs.Throw.performed += _ => Throw();

        ready = true;
    }
Exemple #9
0
    void Start()
    {
        time          = 4;
        movement      = false;
        weaponScript  = GameObject.Find("Weapon").GetComponent <WeaponControls>();
        pointerScript = GameObject.Find("PointerHolder").GetComponent <Pointer>();

        rigid = GetComponent <Rigidbody2D>();

        rigid.gravityScale = 1;
    }
Exemple #10
0
    void Awake()
    {
        rigidbody = GetComponent <Rigidbody> ();

//		if (dummy) {
//			GetComponentInChildren<Camera>().enabled =false;
//		}

        weaponControls = GetComponentInChildren <WeaponControls>();
        gameController = FindObjectOfType <GameController>();
    }
	void Awake() {
		rigidbody = GetComponent<Rigidbody> ();

//		if (dummy) {
//			GetComponentInChildren<Camera>().enabled =false;
//		}

		weaponControls = GetComponentInChildren<WeaponControls>();
		gameController = FindObjectOfType<GameController>();

	}