void Start() { mgr = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <T2.Manager>(); trPlayer = GameObject.FindGameObjectWithTag(Tags.CameraTarget).transform; bulletPool.CreatePool(oBulletPref, 10); }
public static T2.Manager GetInstance() { if (!instance) { instance = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <T2.Manager>(); if (!instance) { print("T2.Manager스크립트가 있는 게임오브젝트가 없습니다."); } } return(instance); }
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(); }
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; }
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); }
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; }