private void RegisterMouseClick() { this.rayCaster = Camera.main.GetComponent <CameraRaycaster>(); // register with the CameraRaycaster that we are listening to layer hit changes this.rayCaster.notifyMouseClickObservers += OnMouseClick; }
void Start() { raycaster = FindObjectOfType <CameraRaycaster>(); agent = GetComponent <NavMeshAgent>(); // raycaster.onPriorityLayerClick += OnTerrainClick; }
public static bool IsInDirectMode = false; // Static? private void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); cameraRaycaster.notifyMouseClickObservers += ProcessMouseMovement; thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); currentDestination = transform.position; }
private void RegisterForMouseEvents() { CameraRaycaster cameraRaycaster = FindObjectOfType <CameraRaycaster>(); cameraRaycaster.onMouseOverEnemy += OnMouseOverEnemy; cameraRaycaster.onMouseOverPotentaillyWalkable += onMouseOverPotentiallyWalkable; }
void RegisterForMouseEvents() { CameraRaycaster cameraRaycaster = FindObjectOfType <CameraRaycaster>(); cameraRaycaster.onMouseOverEnemy += OnMouseOverEnemy; cameraRaycaster.onMouseOverTerrain += OnMouseOverTerrain; }
private void RegisterCameraObservers() { CameraRaycaster cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); cameraRaycaster.notifyMouseOverTerrainObservers += MouseOverTerrainMovement; cameraRaycaster.notifyMouseOverEnemyObservers += MouseOverEnemyTarget; }
void Start() { cameraRaycaster = FindObjectOfType <CameraRaycaster>(); cameraRaycaster.notifyMouseClickObservers += OnMouseClick; currentHealthPoints = maxHealthPoints; PutWeaponInHand(); }
void Start() { cameraRayCaster = Camera.main.GetComponent <CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); ResetClickTarget(); cameraRayCaster.LayersChangeEvent += OnLayerChange; }
private void Start() { currentHealthPoints = maxHealthPoints; raycaster = Camera.main.GetComponent <CameraRaycaster>(); raycaster.notifyMouseClickObservers += OnMouseClick; }
private void RegisterForMouseEvents() { cameraRaycaster = FindObjectOfType <CameraRaycaster>(); cameraRaycaster.mouseOverEnemy += OnLeftMouseClickAttack; cameraRaycaster.mouseOverPlayer += OnleftMouseClickOnPlayer; cameraRaycaster.mouseOverPotentiallyWalkable += OnRightClickMovement; }
private void Start() { cameraRaycaster = Camera.main.transform.parent.GetComponent <CameraRaycaster>(); character = GetComponent <ThirdPersonCharacter>(); currentClickTarget = transform.position; clickIndicator = GameObject.FindGameObjectWithTag("ClickIndicator"); indicatorIcon = clickIndicator.transform.Find("ClickIndicatorIcon").gameObject; }
private void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); m_Character = GetComponent <ThirdPersonCharacter>(); currentClickTarget = transform.position; aICharacterControl = GetComponent <AICharacterControl>(); walkTarget = new GameObject("walkTarget"); }
// Use this for initialization void Start() { nextAttackTime = 0; cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); //cameraRaycaster.notifyMouseClickObservers += Attack; }
void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); aiCharacterControl = GetComponent <AICharacterControl>(); walkTarget = new GameObject("walkTarget"); cameraRaycaster.notifyMouseClickObservers += OnMouseClick; // adding to the set of observers of CameraRaycast }
private void Start() { cameraRaycaster = FindObjectOfType <CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); currentDestination = transform.position; targetRotation = transform.rotation; turnInput = 0; }
protected override void Start() { base.Start(); cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); playerController = GetComponent <PlayerController>(); playerMotor = GetComponent <PlayerMotor>(); animator = GetComponentInChildren <Animator>(); }
private void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); aiCharacterControl = GetComponent <AICharacterControl>(); cameraRaycaster.notifyMouseClickObservers += ProcessMouseClick; walkTarget = new GameObject("walkTarget"); }
private void Start() { // get the third person character ( this should never be null due to require component ) cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); character = GetComponent <ThirdPersonCharacter>(); currentDestination = transform.position; currentClickTarget = transform.position; }
private void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); cameraTransform = Camera.main.transform; //cameraRaycaster = FindObjectOfType<CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); currentClickTarget = transform.position; }
//TODO register Collector for onMouseOverCollector private void Awake() { if (instance != null) { Debug.Log("two ray casters"); } instance = this; }
private void Start() { camRay = FindObjectOfType <CameraRaycaster>(); camRay.notifyMouseClickObservers += OnMouseClicked; currentHealthPoints = maxHealthPoints; animator = GetComponent <Animator>(); PutWeaponInHand(); }
private void Start() { flagche = true; //flag1 = true; cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); //eathen is that you ?? m_Character = GetComponent <ThirdPersonCharacter>(); currentClickTarget = transform.position; }
private void Start() { cameraRaycaster = FindObjectOfType <CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); // currentDestination = transform.position; targetRotation = transform.rotation; cameraRaycaster.notifyMouseClickObservers += ProcessMouseClick; }
private void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); // Get the CameraRaycaster component from the main camera thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); aiCharacterControl = GetComponent <AICharacterControl>(); cameraRaycaster.notifyMouseClickObservers += ProcessPathfindingMovement; walkTarget = new GameObject(); }
void Start() { RayCaster = FindObjectOfType <CameraRaycaster>(); RayCaster.NotifyMouseClickObservers += OnMouseClick; CoolDown = new Timer(AttackCooldown); Health = HealthMax; EqipWeapon(); }
private void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); Thirdperson = GetComponent <ThirdPersonCharacter>(); currentDestination = transform.position; aicharacterControl = GetComponent <AICharacterControl>(); walkTarget = new GameObject("walkTarget"); cameraRaycaster.notifyMouseClickObservers += ProcessMouseClick; }
private void OnEnable() { // Variable initializations. _cameraRaycaster = GetComponent <CameraRaycaster>(); Assert.IsNotNull(_cameraRaycaster); // Event subscribing. _cameraRaycaster.LayerChanged += OnLayerChanged; }
void Start() { navMeshAgent = GetComponent <NavMeshAgent> (); cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); aiCharControl = GetComponent <AICharacterControl> (); cameraRaycaster.notifyMouseClickObservers += ProcessMouseClick; }
void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); thirdPersonCharacter = GetComponent <ThirdPersonCharacter>(); aiCharacterControl = GetComponent <AICharacterControl>(); walkTarget = new GameObject("walkTarget"); cameraRaycaster.onMouseOverPotentiallyWalkable += OnMouseOverPotentiallyWalkable; cameraRaycaster.onMouseOverEnemy += OnMouseOverEnemy; }
// TODO: Implement jump // TODO: Fix slowness issues with gamepad movement private void Start() { cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>(); character = GetComponent <ThirdPersonCharacter>(); navMeshAgent = GetComponent <NavMeshAgent>(); aiCharacterControl = GetComponent <AICharacterControl>(); walkTarget = new GameObject("WalkTarget"); cameraRaycaster.notifyMouseClickObservers += OnClickPriorityLayer; }
void Start() { cameraRaycaster = Camera.main.GetComponent<CameraRaycaster>(); //deadlineMax = gameLengthMax; //if(workers.Count == 0) workers = new List<Worker>(); if(workers.Count == 0) workers = CharSelectScript.selectedworkers; // Get worker class objects from CharSelectScript Debug.Log("workers.Count " + workers.Count); // Create Worker GameObjects if(workers.Count == 0) SpawnWorkers(true); else SpawnWorkers(false); CountWorkers(); // Create Tasks GenerateTaskList(); // Find Rooms ConferenceRoomObj = GameObject.Find("ConferenceRoom"); // Create Team Badges //CreateTeamBadges(); TeamBadge.CreateTeamBadges(); FloatingText.style = floatingTextStyle; }
// Use this for initialization void Start() { cameraRaycaster = Camera.main.GetComponent<CameraRaycaster>(); SpawnWorkers(); //Banner.AddMovingBanner("Choose Your Team!!", 82f, new Vector3(Screen.width /2, Screen.height/2,0), 0.65f, Interpolate.EaseType.EaseOutSine, new float[]{-512f, Screen.height * 0.5f + 256f, 3f}, new float[]{0f, -1 *(Screen.height * 0.5f + 256f), 3f}, 2.5f); Banner.AddScalingBanner("Choose Your Team!!", 82f, new Vector3(Screen.width /2, Screen.height/2,0), 0.65f, Interpolate.EaseType.EaseOutSine, new float[]{0,0.75f,3f}, new float[]{1f,0f,2.5f},1f, BannerColor.Yellow); }