private void HandleMental(ref Mentality mental, string[] data) { LookUpTables lookUp = new LookUpTables(); mental.morale = Convert.ToInt32(data[0].Trim()); mental.discipline = lookUp.LookUpKey <Statmental_discipline>(data[1].Trim()); mental.training = lookUp.LookUpKey <Statmental_training>(data[2].Trim()); }
void Start() { maze = GameObject.FindWithTag("Main").GetComponent <MazeGenerator>(); soundEffectManager = GameObject.FindWithTag("Main").GetComponent <SoundEffectManager>(); mentality = null; }
void Start() { mentality = GameObject.FindWithTag("Player").GetComponent <Mentality>(); if (heartbeatSounds.Length > 0) { frame = heartbeatStartPercent / heartbeatSounds.Length; } }
void Start() { vitality = GetComponent <Vitality>(); mentality = GetComponent <Mentality>(); skillMenu = GameObject.FindWithTag("Main").GetComponent <SkillMenu>(); skillMenu.unlockSkill(1); skillMenu.setSkillMessage(1, "Roar"); soundEffectManager = GameObject.FindWithTag("Main").GetComponent <SoundEffectManager>(); }
void Start() { mentality = GetComponent <Mentality>(); skillMenu = GameObject.FindWithTag("Main").GetComponent <SkillMenu>(); skillMenu.unlockSkill(4); maze = GameObject.FindWithTag("Main").GetComponent <MazeGenerator>(); bloodPrefab = GameObject.FindGameObjectWithTag("BloodFromPlayer"); soundEffectManager = GameObject.FindWithTag("Main").GetComponent <SoundEffectManager>(); }
void OnTriggerEnter(Collider other) { if (other.tag == "Player") { soundEffectManager.playMentalityPotionSound(); if (!mentality) { mentality = other.GetComponent <Mentality>(); } mentality.gain(mentalityGain); Vector3 randomEventPosition = maze.getNewEventPosition(transform.position); transform.position = randomEventPosition; } }
// Use this for initialization void Awake() { stamina = new Stamina(); mentality = new Mentality(); lacklustreTime = 0.0f; staminaTrans = GameObject.FindGameObjectWithTag("Stamina").GetComponent <Transform>(); mentalityTrans = GameObject.FindGameObjectWithTag("Mentality").GetComponent <Transform>(); motionBlur = GameObject.FindGameObjectWithTag("MainCamera"). GetComponent <UnityStandardAssets.ImageEffects.MotionBlur>(); motionBlurSound = new SoundController(motionBlur.gameObject); NotificationCenter.DefaultCenter.AddObserver(this, "BeShotFromMonster"); }
void Start() { maze = GameObject.FindWithTag("Main").GetComponent <MazeGenerator>(); lookAtPoint = GameObject.FindWithTag("LookAtPoint"); player = GameObject.FindWithTag("Player"); playerMentality = player.GetComponent <Mentality>(); playerCharacterMotor = player.GetComponent <CharacterMotor>(); playerMouseLook = player.GetComponent <MouseLook2>(); cameraShaker = GameObject.FindWithTag("Main").GetComponent <CameraShaker>(); soundEffectManager = GameObject.FindWithTag("Main").GetComponent <SoundEffectManager>(); soundEffectManager.adjustSound(); mainAudioSource = GameObject.FindWithTag("Main").GetComponent <AudioSource>(); bloodSplatter = GameObject.FindWithTag("Main").GetComponent <BloodSplatter>(); scoreboard = GameObject.FindWithTag("Main").GetComponent <Scoreboard>(); countDown = GameObject.FindWithTag("Main").GetComponent <CountDown>(); fadeOutAndFadeIn = Camera.main.GetComponent <FadeOutAndFadeIn>(); virtualPlayer = new GameObject(); virtualPlayer.name = "virtual player"; childrenRenderers = GetComponentsInChildren <Renderer>(); sphereCollider = GetComponent <SphereCollider>(); npcState = GetComponent <NPCState>(); npcState.state = NPCState.MAKING_DECISION; isInsane = false; isMoving = false; isCameraMoving = false; fakeBossPositionDelta = new Vector2(0, 0); if (GameMode.mode == GameMode.ESCAPING) { player.GetComponent <Compass>().enabled = false; } }
void Start() { slowingTime = 0; blindTime = 0; characterMotor = GetComponent <CharacterMotor>(); mentality = GetComponent <Mentality>(); sightAdjuster = GetComponentInChildren <SightAdjuster>(); light = GetComponentInChildren <Light>(); originalForwardSpeed = characterMotor.movement.maxForwardSpeed; originalSidewaysSpeed = characterMotor.movement.maxSidewaysSpeed; originalBackwardsSpeed = characterMotor.movement.maxBackwardsSpeed; slowingForwardSpeed = originalForwardSpeed * timesOfSpeed; slowingSidewaysSpeed = originalSidewaysSpeed * timesOfSpeed; slowingBackwardsSpeed = originalBackwardsSpeed * timesOfSpeed; originalMaxMentalityPoint = mentality.getMaxMentalityPoint(); blindMaxMentalityPoint = originalMaxMentalityPoint * timesOfMaxMentality; }
void Start() { mentality = GameObject.FindWithTag("Player").GetComponent <Mentality>(); mainCamera = Camera.main; motionBlur = mainCamera.GetComponent <MotionBlur>(); }