// Use this for initialization void Start() { script = this; //載入敵人資訊 this.bossInfo = this.GetComponent<BossPropertyInfo>(); //設定BoneAnimation this.boneAnimation = this.GetComponent<SmoothMoves.BoneAnimation>(); this.boneAnimation.RegisterUserTriggerDelegate(UserTrigger); GameManager.script.RegisterBoneAnimation(this.boneAnimation); //註冊BoneAnimation,GameManager統一管理 this.boneAnimation.playAutomatically = false; this.boneAnimation.Play("nowake"); this.currentBossAction = BossAction.未甦醒; this.currentOpenFlowerCount = 0; //目前開出花朵的數目設定為0 this.addDamageValue = 0; //累積的傷害值設定為0 this.ActionTimer.ChangeTimerState(false); //關閉計時器功能 this.currentAttackProbability = this.minAttackProbability; //當前觸發樹根攻擊的機率為最小機率 this.currentAddFlowerOpenTime = this.ActionTimer.花朵生成時間; this.NextActionTime = this.ActionTimer.觸發小樹根間隔時間; }
// Use this for initialization void Start() { script = this; GameManager.script.CurrentBossObject = this.gameObject; //紀錄當前魔王物件(使用絕技要暫停iTween) //載入敵人資訊 this.bossInfo = this.GetComponent<BossPropertyInfo>(); //設定BoneAnimation this.boneAnimation = this.GetComponent<SmoothMoves.BoneAnimation>(); this.boneAnimation.RegisterUserTriggerDelegate(UserTrigger); this.boneAnimation.RegisterColliderTriggerDelegate(WeaponHit); GameManager.script.RegisterBoneAnimation(this.boneAnimation); //註冊BoneAnimation,GameManager統一管理 //紀錄原始Scale this.originScale = this.transform.localScale; //抓到Boss的定位點 foreach (var pos in this.BattlePositionList) pos.PositionTransform = GameObject.Find(pos.PositionName).transform; this.NextActionTime = 0; //測試用,進行魔王登場 this.BossReadyAppear(); }