void Start() { m_pInput = m_target.GetComponent <RunnerInput>(); m_runnerController = m_target.GetComponent <RunnerController>(); m_targetPos = m_target.transform.position; m_playerNum = m_runnerController.m_playerNum; }
void Awake() { m_runnerController = GetComponent <RunnerController>(); m_runnerInput = GetComponent <RunnerInput>(); m_status = GetComponent <RunnerStatus>(); m_runnerSkill = GetComponent <RunnerSkill>(); m_animatorManeger = new AnimatorManager(GetComponentsInChildren <Animator>(true)); }
public bool PushSubmit; //決定ボタンが押されてるか // Use this for initialization void Awake() { m_runnerInput = GetComponent <RunnerInput>(); selectstate = 0; scaleChangeSpeed = 5f; scale = 30f; PushSubmit = false; SubmitSprite.SetActive(false); }
// Use this for initialization void Awake() { m_runnerInput = GetComponent <RunnerInput>(); SelectState = true; StartSprite.transform.localScale = new Vector3(50, 50, 1); HowtoplaySprite.transform.localScale = new Vector3(20, 20, 1); StartSprite.GetComponent <SpriteRenderer>().color = new Color(1, 1, 1, 1); HowtoplaySprite.GetComponent <SpriteRenderer>().color = new Color(0, 0, 0, 0.75f); }
private void Awake() { m_uIController = GameObject.Find("UIController").GetComponent <UIController>();; m_runnerInput = GetComponent <RunnerInput>(); m_runnerStatus = GetComponent <RunnerStatus>(); m_runnerSkill = GetComponent <RunnerSkill>(); m_rigidbody = GetComponent <Rigidbody>(); m_animaton = GetComponent <PlayerAnimator>(); }
void Start() { if (VRSettings.enabled) { InputTracking.Recenter(); } Init(); m_pInput = GetComponent <RunnerInput>(); }
void Start() { m_runnerStatus = GetComponent <RunnerStatus>(); m_runnerInput = GetComponent <RunnerInput>(); m_runnerMove = GetComponent <RunnerMove>(); m_runnerController = GetComponent <RunnerController>(); m_uIController = GameObject.Find("UIController").GetComponent <UIController>();; m_runnerAnimator = GetComponent <PlayerAnimator>(); m_playerNum = m_runnerController.m_playerNum; }
private void Awake() { m_runnerInput = GetComponent <RunnerInput>(); m_ChaserMove = GetComponent <ChaserMove>(); m_runnerStatus = GetComponent <RunnerStatus>(); m_rigidBody = GetComponent <Rigidbody>(); m_chaserColor = GetComponentInChildren <SkinnedMeshRenderer>().material.color; m_playerAnimator = GetComponent <PlayerAnimator>(); m_uIController = GameObject.Find("UIController").GetComponent <UIController>(); //m_uIController = GetComponent<UIController>(); StatusInit(); m_chaserState = ChaserState.normal; }
void Awake() { m_rigidBody = GetComponent <Rigidbody>(); m_runnerInput = GetComponent <RunnerInput>(); m_runnerMove = GetComponent <RunnerMove>(); m_runnerStatus = GetComponent <RunnerStatus>(); m_runnerSkill = GetComponent <RunnerSkill>(); m_rigidBody = GetComponent <Rigidbody>(); m_runnerAnimator = GetComponent <PlayerAnimator>(); //初期ステータス m_runnerStatus.firstSpeed = 2; m_runnerStatus.maxSpeed = 3; m_runnerStatus.health = 5; m_runnerStatus.maxHealth = 5; m_runnerStatus.isState = true; m_runnerStatus.ishave = false; m_runnerStatus.animator = GetComponent <Animator>(); if (ChaserFlag == false) { m_runnerStatus.animator.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Runner"); } }
private void Awake() { m_runnerInput = GetComponent <RunnerInput>(); m_status = GetComponent <RunnerStatus>(); m_rigidbody = GetComponent <Rigidbody>(); }
public RunnerState Transition(RunnerInput input, CollisionInfo collisionInfo, Rigidbody rigidbody) { velocity = rigidbody.velocity; contacts = collisionInfo; var inputToTry = input.Try(); Dictionary<InputState, List<TransitionInfo>> availableInputs; if (_availableTransitions.TryGetValue(currentState, out availableInputs)) { List<TransitionInfo> inputTransitions; if (availableInputs.TryGetValue(inputToTry, out inputTransitions)) { var firstMatchingTransition = inputTransitions .FirstOrDefault(t => (t.CollisionRequirements ?? CollisionInfo.Empty).Valid(collisionInfo) && IsTransitionReady(t) && IsDelayUp(t) && t.VelocityRequirements.Equals(rigidbody.velocity)); if (firstMatchingTransition != null) { lastTransition = currentState + "To" + firstMatchingTransition.NextState; currentState = firstMatchingTransition.NextState; chosenTransition = firstMatchingTransition.TransitionName; lastUseTime = Time.time; firstMatchingTransition.Use(); if (firstMatchingTransition.ReuseTime > 0) { Debug.Log("Queuing for effect: " + firstMatchingTransition.NextState); _rechargingStates.Enqueue(firstMatchingTransition); } if (firstMatchingTransition.HasTransitionEffect) TrySendEventMessage(firstMatchingTransition.NextState.ToString()); input.Complete(); } } } StateProcessQueue.Enqueue(currentState); if (reportState) Messenger.Default.Send(new RunnerStatsMessage(currentState, velocity, collisionInfo, inputToTry)); return currentState; }
protected void SetupDependencies(RunnerMotor runnerMotor, RunnerInput controller, RunnerFSM runnerFsm, RunnerAnimationEngine animationEngine, RunnerEffectEngine effectEngine) { motor = runnerMotor; inputController = controller; runnerStateMachine = runnerFsm; runnerAnim = animationEngine; runnerEffectEngine = effectEngine; }