public BlockingTutorialObjective(ObjectiveSystem objSys) : base(objSys) { playerControlScript = objSys.playerObject.GetComponent <PlayerControl>(); tutorialTextComponent = objSys.tutorialText.GetComponent <TextMeshProUGUI>(); playerMovement = objSys.playerObject.GetComponent <PlayerMovementV2>(); tutorialEnemyFOV = objSys.tutorialEnemy.GetComponent <FieldOfView>(); }
public MovementTutorialObjective(ObjectiveSystem objSys) : base(objSys) { tutorialTextComponent = objSys.tutorialText.GetComponent <TextMeshProUGUI>(); tutorialEnemyWeaponCollision = objSys.tutorialEnemyWeapon.GetComponent <EnemyWeaponCollision>(); playerCollision = objSys.playerObject.GetComponent <PlayerCollision>(); playerMovement = objSys.playerObject.GetComponent <PlayerMovementV2>(); tutorialEnemyFOV = objSys.tutorialEnemy.GetComponent <FieldOfView>(); playerControlScript = objSys.playerObject.GetComponent <PlayerControl>(); }
// Use this for initialization void Start() { pauseScreen.SetActive(false); // pauseText.enabled = false; players = GameObject.FindGameObjectsWithTag("Player"); //Get your objective system _objectiveSystem = GetComponent <ObjectiveSystem>(); }
public OpeningObjective(ObjectiveSystem objSys) : base(objSys) { playerControlScript = objSys.playerObject.GetComponent <PlayerControl>(); playerMovement = objSys.playerObject.GetComponent <PlayerMovementV2>(); tutorialEnemyFOV = objSys.tutorialEnemy.GetComponent <FieldOfView>(); tutorialEnemyFOV = objSys.tutorialEnemy.GetComponent <FieldOfView>(); Image[] imageComponents = objSys.skipCutsceneUI.GetComponentsInChildren <Image>(); this.arrowsImage = imageComponents[0]; this.spacebarIcon = imageComponents[1]; this.skipText = objSys.skipCutsceneUI.GetComponentInChildren <TextMeshProUGUI>(); }
// Use this for initialization void Start() { HelloAngel(); stopWatch = 0f; //find the objective manager _objectiveSystem = FindObjectOfType <ObjectiveSystem>(); foreach (Toggle goal in _objectiveSystem.objectiveDisplay) { if (goal.GetComponentInChildren <Text>().text == "Stop Disir for Regenerating.") { myGoaldisplay = goal; } } gameObject.SetActive(false);//turn this object off }
private ObjectiveSystem _objectiveSystem; //Current objective system whithin the scene // Use this for initialization void Start() { originalPos = transform.position; //Fetch the objective system whith in the scene _objectiveSystem = FindObjectOfType <ObjectiveSystem>(); if (_objectiveSystem == null) //Error checking { Debug.LogError(name + " couldn't find the objective system in the current scene and cannot fuction without it."); Debug.Break(); //Hault the editor } //=================================================================================== // AudioSource //If this object does not have an AudioSource, add one if (GetComponent <AudioSource>() == null) { gameObject.AddComponent <AudioSource>(); } //Assign the AudioSource on this object to the variable (To make it easier to type) audioSource = gameObject.GetComponent <AudioSource>(); //Make sure this object never loops audioSource.loop = false; //=================================================================================== //=================================================================================== // Special Attack //Set the Effect for the Special Attack off if (specialAttackEffect != null) { specialAttackEffect.SetActive(false); } //=================================================================================== //=================================================================================== // Aggro //Set starting target to wolf by default target = wolf; //=================================================================================== remainingHydras = 3; }
void Start() { _objectivesystem = GameObject.FindObjectOfType <ObjectiveSystem> (); aggro = true; origAggroIntensity = aggroIntensity; repulsionField.GetComponent <Hitbox>().damage = repulseDamage; if (repulsionField != null && repulsionField.GetComponent <Hitbox>()) { repulsionField.GetComponent <Hitbox>().damage = repulseDamage; repulsionField.SetActive(false); } if (!GetComponent <NavMeshAgent>()) { gameObject.AddComponent <NavMeshAgent>(); } if (moveSpeed == 0) { moveSpeed = 3; } for (int i = 0; i < shields.Length; i++) { for (int c = 0; c < shields[i].transform.childCount; c++) { if (shields[i].transform.GetChild(c).GetComponent <Target>()) { shields[i].transform.GetChild(c).GetComponent <Target>().health = shieldPlateHealth; } } } }
public PerfectBlockTutorialObjective(ObjectiveSystem objSys) : base(objSys) { tutorialTextComponent = objSys.tutorialText.GetComponent <TextMeshProUGUI>(); }
protected bool isActive = false; // this will be used to check if it responds to game events public Objective(ObjectiveSystem objSys) { this.objSys = objSys; }
public LockOnTutorialObjective(ObjectiveSystem objSys) : base(objSys) { playerControlScript = objSys.playerObject.GetComponent <PlayerControl>(); tutorialTextComponent = objSys.tutorialText.GetComponent <TextMeshProUGUI>(); }
public OpeningObjective(ObjectiveSystem objSys) : base(objSys) { playerControlScript = objSys.playerObject.GetComponent <PlayerControl>(); playerMovement = objSys.playerObject.GetComponent <PlayerMovementV2>(); tutorialEnemyFOV = objSys.tutorialEnemy.GetComponent <FieldOfView>(); }