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>(); }
void Awake() { laserLine = GetComponent <LineRenderer>(); weaponControls = new WeaponControls(); weaponControls.GunInputs.Shoot.performed += _ => Shoot(); }
// 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(); } }
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; }
void Awake() { rigidBody = GetComponent <Rigidbody>(); m_collider = GetComponent <Collider>(); weaponControls = new WeaponControls(); weaponControls.BananaInputs.Throw.performed += _ => Throw(); ready = true; }
void Start() { time = 4; movement = false; weaponScript = GameObject.Find("Weapon").GetComponent <WeaponControls>(); pointerScript = GameObject.Find("PointerHolder").GetComponent <Pointer>(); rigid = GetComponent <Rigidbody2D>(); rigid.gravityScale = 1; }
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>(); }