コード例 #1
0
    private void OnDestroy()
    {
        AN_GameManager man = FindObjectOfType <AN_GameManager>();

        man.Score++;
        man.GanerateWeapon(transform);
        Instantiate(DeathEffect, transform.position, Quaternion.identity);
    }
コード例 #2
0
    private void Start()
    {
        pweapon = FindObjectOfType <AN_PlayerWeapon>();
        manager = FindObjectOfType <AN_GameManager>();
        Belt    = pweapon.Belt;
        DropPos = pweapon.DropPosition;

        rb             = GetComponent <Rigidbody>();
        rb.isKinematic = true;

        lgt = GetComponent <Light>();
    }
コード例 #3
0
    private void Start()
    {
        agent = GetComponent <NavMeshAgent>();

        player = FindObjectOfType <AN_PlayerParams>();

        // size
        AN_GameManager man  = FindObjectOfType <AN_GameManager>();
        float          size = 1f + man.Respowned * .01f;

        size = Mathf.Clamp(size, 1f, 2f);
        transform.localScale = Vector3.one * Random.Range(1f, size);
        CurrentHealth       *= size * 1.5f;
    }
コード例 #4
0
    private void Start()
    {
        Hands = FindObjectOfType <AN_PlayerWeapon>().WeaponPoint;

        SpTrigger           = gameObject.AddComponent <SphereCollider>();
        SpTrigger           = GetComponent <SphereCollider>();
        SpTrigger.radius    = 1f;
        SpTrigger.isTrigger = true;

        rb             = gameObject.AddComponent <Rigidbody>();
        rb             = GetComponent <Rigidbody>();
        rb.isKinematic = true;

        manager = FindObjectOfType <AN_GameManager>();

        selectLight           = gameObject.AddComponent <Light>();
        selectLight.color     = new UnityEngine.Color(1, 1, .5f, 1);
        selectLight.intensity = 3;
        selectLight.range     = 5;

        cameraShake = FindObjectOfType <AN_cameraShake>();
    }
コード例 #5
0
 private void Start()
 {
     manager = FindObjectOfType <AN_GameManager>();
     agent   = GetComponent <NavMeshAgent>();
     tds     = FindObjectOfType <AN_TDS_Controller>();
 }
コード例 #6
0
 private void Start()
 {
     manager = FindObjectOfType <AN_GameManager>();
 }
コード例 #7
0
 private void Start()
 {
     manager = FindObjectOfType <AN_GameManager>();
     source  = GetComponent <AudioSource>();
 }