Ejemplo n.º 1
0
 void Start()
 {
     spriteR   = gameObject.GetComponent <SpriteRenderer>();
     preSprite = spriteR.sprite;
     health    = gameObject.GetComponent <Health>();
     preHealth = health.getHealth();
     shoot     = gameObject.GetComponent <shooting>();
 }
Ejemplo n.º 2
0
 // 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>();
 }
Ejemplo n.º 3
0
    public void die()
    {
        shooting shoot = gameObject.GetComponent <shooting>();

        shoot.possess(false);
        Health health = gameObject.GetComponent <Health>();

        health.setHealth(preHealth);
        spriteR.sprite = preSprite;
    }
Ejemplo n.º 4
0
    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;
    }
Ejemplo n.º 5
0
 // 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> ();
 }
Ejemplo n.º 6
0
 public void Start()
 {
     shoot = gameObject.GetComponent <shooting>();
     camD  = GetComponentInChildren <CameraDetatch>();
 }
Ejemplo n.º 7
0
 void Start()
 {
     getShooting = new shooting();
     getShooting = GameObject.FindGameObjectWithTag("Crosshair").GetComponent <shooting>();
 }
Ejemplo n.º 8
0
    // 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>();
 }
Ejemplo n.º 10
0
 private void Awake()
 {
     Instance = this;
 }
Ejemplo n.º 11
0
 // Start is called before the first frame update
 void Start()
 {
     playerMovement = this.gameObject.GetComponent <PlayerMovement>();
     shootingScript = this.gameObject.GetComponent <shooting>();
     state          = State.WaitingForInput;
 }
Ejemplo n.º 12
0
 void Start()
 {
     // Get the FirstPersonController script.
     controller   = this.GetComponent <RigidbodyFirstPersonController>();
     changebullet = GetComponent <shooting>();
 }
Ejemplo n.º 13
0
 // Use this for initialization
 void Start()
 {
     shoot            = GetComponentInChildren <shooting>();
     movedThisTurn    = false;
     attackedThisTurn = false;
 }