void Start() { spriteR = gameObject.GetComponent <SpriteRenderer>(); preSprite = spriteR.sprite; health = gameObject.GetComponent <Health>(); preHealth = health.getHealth(); shoot = gameObject.GetComponent <shooting>(); }
// Start is called before the first frame update void Awake() { isGamePaused = false; player = this.gameObject; shootingScript = player.GetComponent <shooting>(); playerRigidbody2D = gameObject.GetComponent <Rigidbody2D>(); gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); }
public void die() { shooting shoot = gameObject.GetComponent <shooting>(); shoot.possess(false); Health health = gameObject.GetComponent <Health>(); health.setHealth(preHealth); spriteR.sprite = preSprite; }
private void Awake() { playerControllerScript = this.gameObject.GetComponent <PlayerController>(); shootingScript = this.gameObject.GetComponent <shooting>(); GameObject weapons = this.gameObject.transform.GetChild(0).gameObject; pistol = weapons.transform.GetChild(PISTOL_INDEX).gameObject; sniper = weapons.transform.GetChild(SNIPER_INDEX).gameObject; }
// Use this for initialization void Start() { target = GameObject.FindWithTag("MainCamera").transform; charc = GameObject.FindWithTag("MainCamera").GetComponent <shooting> (); manager = GameObject.Find("GameControl").GetComponent <levelManager>(); maxLookDis = 25f; maxAttackDis = 25f; minDistFromPlayer = 0f; rotationDamping = 2f; interval = 2f; shotTime = 0f; positionY = transform.position.y; //ani = gameObject.GetComponent<Animator> (); }
public void Start() { shoot = gameObject.GetComponent <shooting>(); camD = GetComponentInChildren <CameraDetatch>(); }
void Start() { getShooting = new shooting(); getShooting = GameObject.FindGameObjectWithTag("Crosshair").GetComponent <shooting>(); }
// Start is called before the first frame update //bool aux = true; void Start() { sh = GetComponent <shooting>(); animDiskStack = diskStack.GetComponent <Animator>(); audio = recarga.GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { emoShoot = FindObjectOfType <shooting>(); }
private void Awake() { Instance = this; }
// Start is called before the first frame update void Start() { playerMovement = this.gameObject.GetComponent <PlayerMovement>(); shootingScript = this.gameObject.GetComponent <shooting>(); state = State.WaitingForInput; }
void Start() { // Get the FirstPersonController script. controller = this.GetComponent <RigidbodyFirstPersonController>(); changebullet = GetComponent <shooting>(); }
// Use this for initialization void Start() { shoot = GetComponentInChildren <shooting>(); movedThisTurn = false; attackedThisTurn = false; }