예제 #1
0
파일: Player.cs 프로젝트: commaweed/unity
        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;
        }
예제 #2
0
    void Start()
    {
        raycaster = FindObjectOfType <CameraRaycaster>();
        agent     = GetComponent <NavMeshAgent>();

        // raycaster.onPriorityLayerClick += OnTerrainClick;
    }
예제 #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;
    }
예제 #4
0
        private void RegisterForMouseEvents()
        {
            CameraRaycaster cameraRaycaster = FindObjectOfType <CameraRaycaster>();

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

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

            cameraRaycaster.notifyMouseOverTerrainObservers += MouseOverTerrainMovement;
            cameraRaycaster.notifyMouseOverEnemyObservers   += MouseOverEnemyTarget;
        }
예제 #7
0
파일: Player.cs 프로젝트: Sanifor/Dungeonis
 void Start()
 {
     cameraRaycaster = FindObjectOfType <CameraRaycaster>();
     cameraRaycaster.notifyMouseClickObservers += OnMouseClick;
     currentHealthPoints = maxHealthPoints;
     PutWeaponInHand();
 }
예제 #8
0
 void Start()
 {
     cameraRayCaster      = Camera.main.GetComponent <CameraRaycaster>();
     thirdPersonCharacter = GetComponent <ThirdPersonCharacter>();
     ResetClickTarget();
     cameraRayCaster.LayersChangeEvent += OnLayerChange;
 }
예제 #9
0
    private void Start()
    {
        currentHealthPoints = maxHealthPoints;
        raycaster           = Camera.main.GetComponent <CameraRaycaster>();

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

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

        //cameraRaycaster.notifyMouseClickObservers += Attack;
    }
예제 #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;
 }
예제 #16
0
 protected override void Start()
 {
     base.Start();
     cameraRaycaster  = Camera.main.GetComponent <CameraRaycaster>();
     playerController = GetComponent <PlayerController>();
     playerMotor      = GetComponent <PlayerMotor>();
     animator         = GetComponentInChildren <Animator>();
 }
예제 #17
0
 private void Start()
 {
     cameraRaycaster      = Camera.main.GetComponent <CameraRaycaster>();
     thirdPersonCharacter = GetComponent <ThirdPersonCharacter>();
     aiCharacterControl   = GetComponent <AICharacterControl>();
     cameraRaycaster.notifyMouseClickObservers += ProcessMouseClick;
     walkTarget = new GameObject("walkTarget");
 }
예제 #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;
 }
예제 #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;
    }
예제 #21
0
파일: Player.cs 프로젝트: kijprivate/RPG
    private void Start()
    {
        camRay = FindObjectOfType <CameraRaycaster>();
        camRay.notifyMouseClickObservers += OnMouseClicked;
        currentHealthPoints = maxHealthPoints;
        animator            = GetComponent <Animator>();

        PutWeaponInHand();
    }
예제 #22
0
파일: PlayerMovement.cs 프로젝트: atp7/RPG
 private void Start()
 {
     flagche = true;
     //flag1 = true;
     cameraRaycaster = Camera.main.GetComponent <CameraRaycaster>();
     //eathen is that you ??
     m_Character        = GetComponent <ThirdPersonCharacter>();
     currentClickTarget = transform.position;
 }
예제 #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();
    }
예제 #25
0
    void Start()
    {
        RayCaster = FindObjectOfType <CameraRaycaster>();
        RayCaster.NotifyMouseClickObservers += OnMouseClick;
        CoolDown = new Timer(AttackCooldown);
        Health   = HealthMax;

        EqipWeapon();
    }
예제 #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;
 }
예제 #27
0
    private void OnEnable()
    {
        // Variable initializations.
        _cameraRaycaster = GetComponent <CameraRaycaster>();
        Assert.IsNotNull(_cameraRaycaster);

        // Event subscribing.
        _cameraRaycaster.LayerChanged += OnLayerChanged;
    }
예제 #28
0
    void Start()
    {
        navMeshAgent         = GetComponent <NavMeshAgent> ();
        cameraRaycaster      = Camera.main.GetComponent <CameraRaycaster>();
        thirdPersonCharacter = GetComponent <ThirdPersonCharacter>();
        aiCharControl        = GetComponent <AICharacterControl> ();

        cameraRaycaster.notifyMouseClickObservers += ProcessMouseClick;
    }
예제 #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;
        }
예제 #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;
    }
예제 #31
0
    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;
    }
예제 #32
0
    // 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);
    }