protected override void LoadSettingOnOpen(ExpSetting expSetting) { _transfrom = transform; _person = GetComponent <PersonCharacter>(); OnCamerHightChange(expSetting.cameraHight); OnSpeedChange(expSetting.playerSpeed); }
void Start() { m_Character = GetComponent <PersonCharacter>(); m_Agent = GetComponentInChildren <NavMeshAgent>(); m_Agent.updateRotation = false; m_Agent.updatePosition = true; m_MouseLook.Init(transform, m_Cam.transform); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } PersonCharacter = await _context.PersonCharacter.FindAsync(id); if (PersonCharacter != null) { _context.PersonCharacter.Remove(PersonCharacter); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } PersonCharacter = await _context.PersonCharacter .Include(p => p.Character) .Include(p => p.Person).FirstOrDefaultAsync(m => m.PersonCharacterID == id); if (PersonCharacter == null) { return(NotFound()); } return(Page()); }
private void Start() { cam = Camera.main.transform; character = GetComponent<PersonCharacter>(); m_Anim = GetComponent<Animator>(); }