void Start() { for (int i = 0; i < bullet_number.Length; i++) { bullet_number[i] = bulletPool_Ins.InitBulletNum(gunType); gunType++; } //自身刚体组件 selfRigidbody = this.GetComponent <Rigidbody>(); //自身动画 selfAnimator = this.GetComponent <Animator>(); normalattack_Ins = PlayerAttack.normal_attack_Instance; gunType = bulletPool_Ins.nowType; //血量初始化 currentHp = totalHP; //奔跑特效 selTrail = gameObject.GetComponent <TrailRenderer>(); selTrail.enabled = false; //枪 biggun = Biggun.Biggun_ins; //血条 hpBar = selfHpbar.transform.Find("Hpbar").GetComponent <Image>(); selEventSystem.EventIns.EventplayerWin.AddListener(StopWalk); selEventSystem.EventIns.EventPickBullet.AddListener(PickupBullet); }
private void Awake() { Biggun_ins = this; }