/*----------------------------------------------------------| | UNITY METHODS | |----------------------------------------------------------*/ private void Awake () { charState = GetComponent<RomanCharState>(); animator = GetComponent<Animator>(); rb = GetComponent<Rigidbody>(); cCollider = GetComponent<CapsuleCollider>(); }
// Use this for initialization void Start () { charState = GetComponent<RomanCharState> (); charController = GetComponent<RomanCharController> (); animator = GetComponent <Animator> (); rb = GetComponent <Rigidbody> (); }
private void Awake() { if (Instance == null) Instance = this; //inputDevice = InputManager.ActiveDevice; charState = GameObject.FindObjectOfType<RomanCharState>(); }
private void Start () { if (Instance == null) Instance = this; else Destroy(this); // if (cam == null) // cam = Camera.main.GetComponent<TestCam>(); simpleRpgCam = Camera.main.GetComponent<PhatRobit.SimpleRpgCamera>(); charState = GameObject.FindObjectOfType<RomanCharState> (); //camScript = GameObject.FindObjectOfType<RomanCameraController> (); climbDetector = GameObject.FindObjectOfType<ClimbDetector> (); follow = GameObject.FindObjectOfType<FollowPlayer>(); vineClimbCollider = GameObject.FindObjectOfType<VineClimbController2>(); charController = GameObject.FindObjectOfType<RomanCharController>(); tunnelObserver = GameObject.FindObjectOfType<TunnelObserver>(); antiWallSlideController = GameObject.FindObjectOfType<SloapDetector>(); //cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<TestCam>(); // Get the character that is selected if (charController != null) currentChar = charController.transform; }
void Start () { if (GameManager.componentActivatorOn) { ComponentActivator.Instance.Register (this, new Dictionary<GameEvent, bool> { //{ GameEvent.Land, true }, { GameEvent.ClimbOverEdge, true }, { GameEvent.StopClimbing, true }, { GameEvent.FinishClimbOver, true }, //{ GameEvent.Land, true }, //{ GameEvent.LandedFirstTime, false }, { GameEvent.StartVineClimbing, false }, { GameEvent.StartEdgeClimbing, false }, { GameEvent.StartWallClimbing, false } }); } charState = GetComponent<RomanCharState>(); animator = GetComponent<Animator>(); rb = GetComponent<Rigidbody>(); cam = Camera.main.transform; cController = GetComponent<CharacterController>(); cCollider = GetComponent<CapsuleCollider>(); vineClimbCollider = GetComponent<VineClimbController2>(); tunnelObserver = GameManager.Instance.tunnelObserver; combatController = GetComponent<CombatController> (); }
// Use this for initialization void Start() { charState = GetComponent <RomanCharState> (); charController = GetComponent <RomanCharController> (); animator = GetComponent <Animator> (); rb = GetComponent <Rigidbody> (); }
void Start () { charState = GetComponent<RomanCharState>(); if (GameManager.componentActivatorOn) { ComponentActivator.Instance.Register (this, new Dictionary<GameEvent, bool> { { GameEvent.StartClimbing, false }, { GameEvent.StopClimbing, true }, { GameEvent.FinishClimbOver, true } }); } }
// private Animator animator; void Start () { if (player != null) { // animator = player.GetComponent<Animator>(); charState = player.GetComponent<RomanCharState>(); tunnelObserver = GameManager.Instance.tunnelObserver; } else { Debug.LogError("FollowPlayer: Player is null"); } }
private static float lastJumpTime; //Time stamp of the last time the char jumped // Use this for initialization //private Vector3 bounceDirection; void Start() { animator = GetComponent <Animator>(); rb = GetComponent <Rigidbody>(); charController = GetComponent <RomanCharController>(); charState = GetComponent <RomanCharState>(); cCollider = GetComponent <CapsuleCollider>(); if (cColliderFrontTransf == null) { Debug.Log("collider front point not defined"); } // ComponentActivator.Instance.Register(this, new Dictionary<GameEvent, bool> { // { GameEvent.StartWallClimbing, false } // // }); }
private void Awake() { EventManager.onCharEvent = null; EventManager.onInputEvent = null; EventManager.onDetectEvent = null; if (Instance == null) Instance = this; else Destroy(this); charState = GameObject.FindObjectOfType<RomanCharState> (); //camScript = GameObject.FindObjectOfType<RomanCameraController> (); climbDetector = GameObject.FindObjectOfType<ClimbDetector> (); follow = GameObject.FindObjectOfType<FollowPlayer>(); vineClimbCollider = GameObject.FindObjectOfType<VineClimbController2>(); charController = GameObject.FindObjectOfType<RomanCharController>(); }
private void Start () { if (GameManager.componentActivatorOn) { ComponentActivator.Instance.Register (this, new Dictionary<GameEvent, bool> { { GameEvent.Jump, true }, { GameEvent.StartEdgeClimbing, false }, { GameEvent.StartWallClimbing, false }, { GameEvent.StartVineClimbing, false } }); } cCollider = GetComponent<CapsuleCollider>(); climbOverEdge = GetComponent<ClimbOverEdge>(); charState = GetComponent<RomanCharState>(); }
private void Awake () { charState = GetComponent<RomanCharState>(); animator = GetComponent<Animator>(); // Calculate the climbing tween's duration //tweenDuration = edgeTween.groupList[0].endTime - edgeTween.groupList[0].startTime; //print (tweenDuration); // if (edgeTween == null) // Debug.LogError("tween not defined"); // // if (edgePath == null || vinePath == null) // Debug.LogError("path not defined"); //// // // Disable the tween and path at beginning //EnableClimbOverTween(edgePath, edgeTween, false); //EnableClimbOverTween(vinePath, vineTween, false); }
// Use this for initialization void Start () { rb = GetComponent<Rigidbody>(); animator = GetComponent<Animator>(); cController = GetComponent<CharacterController>(); charState = GetComponent<RomanCharState>(); cCollider = GetComponent<CapsuleCollider>(); if (GameManager.componentActivatorOn) { ComponentActivator.Instance.Register (this, new Dictionary<GameEvent, bool> { { GameEvent.WallClimbColliderDetected, true }, //{ GameEvent.StopClimbing, false }, { GameEvent.FinishClimbOver, false }, { GameEvent.Land, false } }); } }
void Awake() { player = GameObject.FindGameObjectWithTag("Player").transform; charState = GameObject.FindObjectOfType<RomanCharState>(); }
private void Start () { charState = GameManager.Instance.charState; SetState(CamState.Free); SetTarget(follow); // tunnelObserver = GameManager.Instance.tunnelObserver; MoveToTarget(); collision.Initialize(Camera.main); collision.UpdateCameraClipPoints(transform.position, transform.rotation, ref collision.adjustedCameraClipPoints); collision.UpdateCameraClipPoints(destination, transform.rotation, ref collision.desiredCameraClipPoints); //previousMousePos = currentMousePos = Input.mousePosition; }
private static float lastJumpTime; //Time stamp of the last time the char jumped // Use this for initialization //private Vector3 bounceDirection; void Start () { animator = GetComponent<Animator>(); rb = GetComponent<Rigidbody>(); charController = GetComponent<RomanCharController>(); charState = GetComponent<RomanCharState>(); cCollider = GetComponent<CapsuleCollider>(); if (cColliderFrontTransf == null) Debug.Log("collider front point not defined"); // ComponentActivator.Instance.Register(this, new Dictionary<GameEvent, bool> { // { GameEvent.StartWallClimbing, false } // // }); }
void Start() { ComponentActivator.Instance.Register(this, new Dictionary<GameEvent, bool> { { GameEvent.Land, true }, { GameEvent.StopVineClimbing, true }, { GameEvent.StopEdgeClimbing, true }, { GameEvent.FinishClimbOver, true }, { GameEvent.StartVineClimbing, false }, { GameEvent.StartEdgeClimbing, false }, }); charState = GetComponent<RomanCharState>(); animator = GetComponent<Animator>(); rb = GetComponent<Rigidbody>(); cam = Camera.main.transform; cController = GetComponent<CharacterController>(); cCollider = GetComponent<CapsuleCollider>(); vineClimbCollider = GetComponent<VineClimbController2>(); }
private void Awake() { charState = GetComponent<RomanCharState>(); animator = GetComponent<Animator>(); }