// Use this for initialization public override void Start() { base.Start(); var player = GameObject.FindGameObjectWithTag(TagName.Player.String()); if (kirinuke == null) { this.kirinuke = player.GetComponent <Kirinuke>(); } if (rengeki == null) { this.rengeki = player.GetComponent <Rengeki>(); } GetLongPressDetector().OnLongPressTrigger += (e) => { //スロー中に長押しが完了 //切り抜け中ではない //回り込み中ではない //攻撃中ではない //ならば切り抜けを実行する if (Slow.Instance.isSlowNow && !kirinuke.isRunning && !rengeki.moveNow && !rengeki.actionNow) { kirinuke.StartKirinuke(); } }; }
// Use this for initialization void Awake() { if (playerAnimation == null) { this.playerAnimation = GetComponent <PlayerAnimation>(); } if (attackSequence == null) { this.attackSequence = GetComponent <PlayerAttackSequence>(); } if (playerAction == null) { this.playerAction = GetComponent <PlayerAction>(); } if (kirinuke == null) { this.kirinuke = GetComponent <Kirinuke>(); } if (sword == null) { this.sword = GetComponentInChildren <Sword>(); } this.push = new Subject <RengekiPushEvent>(); this.start = new Subject <bool>(); this.end = new Subject <bool>(); this.startObserver = Slow.Instance.onStart.Subscribe(OnSlowStart); this.endObserver = Slow.Instance.onEnd.Subscribe(OnSlowStart); }
// Use this for initialization void Start() { this.startObserver = Slow.Instance.onStart.Subscribe(OnSlowStart); this.endObserver = Slow.Instance.onEnd.Subscribe(OnSlowEnd); if (root == null) { this.root = transform.FindRec("Root"); } //kirinuke, rengekiを設定 var player = GameObject.FindGameObjectWithTag(TagName.Player.String()); if (kirinuke == null) { this.kirinuke = player.GetComponent <Kirinuke>(); } if (rengeki == null) { this.rengeki = player.GetComponent <Rengeki>(); } rengeki.onPush.Subscribe((e) => { rengekiImage.fillAmount = e.parcent; //rengekiMask.SetParcent(e.parcent); }); rengeki.onEnd.Subscribe(OnRengekiEnd); //kirinukeの長押し判定 kirinukeDetector.OnLongPressBegin += () => { SetKirinukeMask(0f); }; kirinukeDetector.OnLongPressing += (e) => { SetKirinukeMask(kirinukeDetector.progress); }; kirinukeDetector.OnLongPressTrigger += (e) => { //スロー中に長押しが完了 //切り抜け中ではない //回り込み中ではない //攻撃中ではない //ならば切り抜けを実行する if (Slow.Instance.isSlowNow && !kirinuke.isRunning && !rengeki.moveNow && !rengeki.actionNow) { kirinuke.StartKirinuke(); } }; kirinukeDetector.OnLongPressEnd += () => { SetKirinukeMask(0f); }; root.SetActive(false); }
// Use this for initialization void Start() { if (cameraController == null) { this.cameraController = Camera.main.GetComponent <CameraController>(); } if (kirinuke == null) { this.kirinuke = GetComponent <Kirinuke>(); } if (rengeki == null) { this.rengeki = GetComponent <Rengeki>(); } Assert.IsTrue(pauseManager != null); this.action = GetComponent <PlayerAction>(); longPressDetector.OnLongPressingOverTime += OnKyuuseiButtonPushStart; longPressDetector.OnLongPressEnd += OnKyuuseiButtonPushEnd; isKyuusei = false; status = GetComponent <PlayerStatus>(); changeStage = FindObjectOfType <ChangeStage>(); }