Ejemplo n.º 1
0
        void Start()
        {
            mgr      = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <T2.Manager>();
            trPlayer = GameObject.FindGameObjectWithTag(Tags.CameraTarget).transform;

            bulletPool.CreatePool(oBulletPref, 10);
        }
Ejemplo n.º 2
0
 public static T2.Manager GetInstance()
 {
     if (!instance)
     {
         instance = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <T2.Manager>();
         if (!instance)
         {
             print("T2.Manager스크립트가 있는 게임오브젝트가 없습니다.");
         }
     }
     return(instance);
 }
Ejemplo n.º 3
0
        void Start()
        {
            moveCtrfl     = GetComponent <T2.MoveCtrl>();
            basicAttack   = GetComponent <T2.BasicAttack>();
            moveCtrfl     = GetComponent <T2.MoveCtrl>();
            animator      = GetComponentInChildren <Animator>();
            mgr           = GetComponent <T2.Manager>();
            trPlayerModel = GameObject.FindGameObjectWithTag(Tags.PlayerModel).transform;


            fSpeed = moveCtrfl.GetMoveSpeed();
        }
Ejemplo n.º 4
0
        void Awake()
        {
            curSkill = T2.Skill.IdleSkill.GetInstance();

            oPlayer       = GameObject.FindGameObjectWithTag(Tags.Player);
            trPlayerModel = GameObject.FindGameObjectWithTag(Tags.PlayerModel).transform;

            mgr         = GetComponent <T2.Manager>();
            moveCtrl    = GetComponent <T2.MoveCtrl>();
            controller  = GetComponent <CharacterController>();
            basicAttack = GetComponent <T2.BasicAttack>();
            animator    = GetComponentInChildren <Animator>();
            cam         = Camera.main;
            trCamPivot  = GameObject.FindGameObjectWithTag(Tags.CameraTarget).transform;
        }
Ejemplo n.º 5
0
        void Awake()
        {
            fMoveSpeed    = T2.Stat.MAX_RUN_MOVE;
            fMaxMoveSpeed = T2.Stat.MAX_RUN_MOVE;

            mgr           = GetComponent <T2.Manager>();
            trPlayerModel = GameObject.FindGameObjectWithTag(Tags.PlayerModel).GetComponent <Transform>();
            controller    = GetComponent <CharacterController>();
            animator      = GetComponentInChildren <Animator>();
            mainCamera    = Camera.main;
            fOrizinFOV    = mainCamera.fieldOfView;

            moveState = MoveState.Stop;

            oSprintEffect.SetActive(true);
        }
Ejemplo n.º 6
0
        void Start()
        {
            iMaxMagazine = T2.Stat.MAX_MAGAZINE;

            moveCtrl      = GetComponent <T2.MoveCtrl>();
            mgr           = GetComponent <T2.Manager>();
            trPlayerModel = GameObject.FindGameObjectWithTag(Tags.PlayerModel).transform;
            animator      = GetComponentInChildren <Animator>();

            cam         = Camera.main;
            followCam   = cam.GetComponent <FollowCam>();
            fOrizinDist = followCam.GetDist();
            fOrizinFOV  = cam.fieldOfView;
            fCamDist    = followCam.GetDist();

            bulletPool.CreatePool(oBulletPref, iMaxMagazine);
            flarePool.CreatePool(oFlarePref, iMaxMagazine * 2);

            muzzleFlash[0].enabled = false;
            muzzleFlash[1].enabled = false;
        }