Example #1
0
        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;
    }
Example #3
0
    public static bool IsInDirectMode = false; // Static?

    private void Start()
    {
        cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>();
        cameraRaycaster.notifyMouseClickObservers += ProcessMouseMovement;
        thirdPersonCharacter = GetComponent <ThirdPersonCharacter>();
        currentDestination   = transform.position;
    }
Example #4
0
        private void RegisterForMouseEvents()
        {
            CameraRaycaster cameraRaycaster = FindObjectOfType <CameraRaycaster>();

            cameraRaycaster.onMouseOverEnemy += OnMouseOverEnemy;
            cameraRaycaster.onMouseOverPotentaillyWalkable += onMouseOverPotentiallyWalkable;
        }
Example #5
0
        void RegisterForMouseEvents()
        {
            CameraRaycaster cameraRaycaster = FindObjectOfType <CameraRaycaster>();

            cameraRaycaster.onMouseOverEnemy   += OnMouseOverEnemy;
            cameraRaycaster.onMouseOverTerrain += OnMouseOverTerrain;
        }
Example #6
0
        private void RegisterCameraObservers()
        {
            CameraRaycaster cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>();

            cameraRaycaster.notifyMouseOverTerrainObservers += MouseOverTerrainMovement;
            cameraRaycaster.notifyMouseOverEnemyObservers   += MouseOverEnemyTarget;
        }
Example #7
0
 void Start()
 {
     cameraRaycaster = FindObjectOfType <CameraRaycaster>();
     cameraRaycaster.notifyMouseClickObservers += OnMouseClick;
     currentHealthPoints = maxHealthPoints;
     PutWeaponInHand();
 }
Example #8
0
 void Start()
 {
     cameraRayCaster      = Camera.main.GetComponent <CameraRaycaster>();
     thirdPersonCharacter = GetComponent <ThirdPersonCharacter>();
     ResetClickTarget();
     cameraRayCaster.LayersChangeEvent += OnLayerChange;
 }
Example #9
0
    private void Start()
    {
        currentHealthPoints = maxHealthPoints;
        raycaster           = Camera.main.GetComponent <CameraRaycaster>();

        raycaster.notifyMouseClickObservers += OnMouseClick;
    }
Example #10
0
 private void RegisterForMouseEvents()
 {
     cameraRaycaster = FindObjectOfType <CameraRaycaster>();
     cameraRaycaster.mouseOverEnemy  += OnLeftMouseClickAttack;
     cameraRaycaster.mouseOverPlayer += OnleftMouseClickOnPlayer;
     cameraRaycaster.mouseOverPotentiallyWalkable += OnRightClickMovement;
 }
Example #11
0
 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;
 }
Example #12
0
 private void Start()
 {
     cameraRaycaster    = Camera.main.GetComponent <CameraRaycaster>();
     m_Character        = GetComponent <ThirdPersonCharacter>();
     currentClickTarget = transform.position;
     aICharacterControl = GetComponent <AICharacterControl>();
     walkTarget         = new GameObject("walkTarget");
 }
Example #13
0
    // Use this for initialization
    void Start()
    {
        nextAttackTime = 0;

        cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>();

        //cameraRaycaster.notifyMouseClickObservers += Attack;
    }
Example #14
0
 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;
 }
Example #16
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");
 }
Example #18
0
 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;
 }
Example #19
0
 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;
    }
Example #21
0
    private void Start()
    {
        camRay = FindObjectOfType <CameraRaycaster>();
        camRay.notifyMouseClickObservers += OnMouseClicked;
        currentHealthPoints = maxHealthPoints;
        animator            = GetComponent <Animator>();

        PutWeaponInHand();
    }
Example #22
0
 private void Start()
 {
     flagche = true;
     //flag1 = true;
     cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>();
     //eathen is that you ??
     m_Character        = GetComponent <ThirdPersonCharacter>();
     currentClickTarget = transform.position;
 }
Example #23
0
    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();
    }
Example #25
0
    void Start()
    {
        RayCaster = FindObjectOfType <CameraRaycaster>();
        RayCaster.NotifyMouseClickObservers += OnMouseClick;
        CoolDown = new Timer(AttackCooldown);
        Health   = HealthMax;

        EqipWeapon();
    }
Example #26
0
 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;
    }
Example #29
0
        void Start()
        {
            cameraRaycaster      = Camera.main.GetComponent <CameraRaycaster>();
            thirdPersonCharacter = GetComponent <ThirdPersonCharacter>();
            aiCharacterControl   = GetComponent <AICharacterControl>();
            walkTarget           = new GameObject("walkTarget");

            cameraRaycaster.onMouseOverPotentiallyWalkable += OnMouseOverPotentiallyWalkable;
            cameraRaycaster.onMouseOverEnemy += OnMouseOverEnemy;
        }
Example #30
0
    // 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);
    }