protected override void LoadSettingOnOpen(ExpSetting expSetting)
 {
     _transfrom = transform;
     _person    = GetComponent <PersonCharacter>();
     OnCamerHightChange(expSetting.cameraHight);
     OnSpeedChange(expSetting.playerSpeed);
 }
Example #2
0
 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);
 }
Example #3
0
        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"));
        }
Example #4
0
        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>();
 }