コード例 #1
0
ファイル: possess.cs プロジェクト: Kayskip/ProjectParasite
 void Start()
 {
     spriteR   = gameObject.GetComponent <SpriteRenderer>();
     preSprite = spriteR.sprite;
     health    = gameObject.GetComponent <Health>();
     preHealth = health.getHealth();
     shoot     = gameObject.GetComponent <shooting>();
 }
コード例 #2
0
ファイル: PlayerController.cs プロジェクト: andesob/MineroBio
 // 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>();
 }
コード例 #3
0
ファイル: possess.cs プロジェクト: Kayskip/ProjectParasite
    public void die()
    {
        shooting shoot = gameObject.GetComponent <shooting>();

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

        health.setHealth(preHealth);
        spriteR.sprite = preSprite;
    }
コード例 #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;
    }
コード例 #5
0
ファイル: AI.cs プロジェクト: hayum/AR-PaperToss
 // 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> ();
 }
コード例 #6
0
 public void Start()
 {
     shoot = gameObject.GetComponent <shooting>();
     camD  = GetComponentInChildren <CameraDetatch>();
 }
コード例 #7
0
 void Start()
 {
     getShooting = new shooting();
     getShooting = GameObject.FindGameObjectWithTag("Crosshair").GetComponent <shooting>();
 }
コード例 #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>();
    }
コード例 #9
0
 // Start is called before the first frame update
 void Start()
 {
     emoShoot = FindObjectOfType <shooting>();
 }
コード例 #10
0
ファイル: shooting.cs プロジェクト: imamroomi/test
 private void Awake()
 {
     Instance = this;
 }
コード例 #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;
 }
コード例 #12
0
ファイル: BonusAdder.cs プロジェクト: prithvihv/Fpsbasics
 void Start()
 {
     // Get the FirstPersonController script.
     controller   = this.GetComponent <RigidbodyFirstPersonController>();
     changebullet = GetComponent <shooting>();
 }
コード例 #13
0
 // Use this for initialization
 void Start()
 {
     shoot            = GetComponentInChildren <shooting>();
     movedThisTurn    = false;
     attackedThisTurn = false;
 }