private void Awake() { audioSource = GetComponent <AudioSource>(); GetLevelManagement = FindObjectOfType <LevelManagement>(); LastPosition = transform.position; Player = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); }
private void Awake() { isInNeutralState = false; isInColor1_Stage1 = false; isInColor1_Stage2 = false; isInColor1_Stage3 = false; isInColor1_Stage4 = false; isInColor1_Stage5 = false; isInColor2_Stage1 = false; isInColor2_Stage2 = false; isInColor2_Stage3 = false; isInColor2_Stage4 = false; isInColor2_Stage5 = false; isInColor3_Stage1 = false; isInColor3_Stage2 = false; isInColor3_Stage3 = false; isInColor3_Stage4 = false; isInColor3_Stage5 = false; if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } DontDestroyOnLoad(this.gameObject); }
void Start() { levelManagement = FindObjectOfType <LevelManagement> (); ieo = FindObjectOfType <IncreaseEcoObjective> (); imo = FindObjectOfType <IncreaseMoneyObjective> (); ieo.onLevelStart(); imo.onLevelStart(); }
// Use this for initialization void Start() { levelManagement = FindObjectOfType <LevelManagement>(); gaurdMovement = FindObjectOfType <GaurdMovement>(); FollowCursor = FindObjectOfType <followCursor>(); winLose = FindObjectOfType <WinLoseScript>(); carried = FindObjectOfType <Carried>(); speed = moveSpeed; }
// Start is called before the first frame update void Start() { if (rb == null) { rb = GetComponent <Rigidbody>(); } levelManagement = GameObject.FindGameObjectWithTag("GameController").GetComponent <LevelManagement>(); }
private void Awake() { Transform holder = transform.Find("Graphic").transform.Find("OBJholder"); handAnimator = holder.GetComponent <Animator>(); hitBehavior = holder.GetComponent <PlayerHitBehaviour>(); lM = FindObjectOfType <LevelManagement>(); }
void Start() { countClick = 0; if (listSprite[countClick] != null) { mainImage.sprite = listSprite[countClick]; } levelManagement = FindObjectOfType <LevelManagement> (); }
private void Awake() { if (instance != null) { Destroy(gameObject); } else { instance = this; } }
void Awake() { // Set static instance to current level manager, allowing access to level specific values LvlObj = this; // Get size of map elements (floorPattern and wallPattern Sprites are same size) elemSize = (int)(floorSprite.bounds.extents.x * 2); numElems = BASE_NUM_ELEMS + ((lvlNum - 1) * NUM_ELEMS_MULT); lvlSize = numElems * elemSize; map = GenerateLevel(); }
// Use this for initialization void Start() { timeToTrigger = 0.5f; lm = GameObject.FindGameObjectWithTag("LevelManager"); _ac = GameObject.FindGameObjectWithTag("AudioManager").GetComponent<AudioControl>(); lmScript = lm.GetComponent<LevelManagement>(); //Needed for collider detection if (lmScript.TriggerByCollider) { _cc = TriggerCollider.GetComponent<CollisionController>(); } //Needed for Has been seen detection _renderer = this.gameObject.GetComponent<Renderer>(); }
private void Awake() { audioSource = GetComponent <AudioSource>(); foreach (GameObject x in Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[]) { if (x.name == "TryAgain_Quit") { TryAgainQuit = x; } } GetLevelManagement = FindObjectOfType <LevelManagement>(); GetPlayerMovement = gameObject.GetComponent <PlayerMovement>(); }
// Use this for initialization void Start() { rend = GetComponent <SpriteRenderer>(); collider = GetComponent <BoxCollider2D>(); levelManagement = FindObjectOfType <LevelManagement>(); playerMovement = FindObjectOfType <PlayerMovement>(); lasers = GetComponent <BoxCollider2D>(); if (TwoBlock) { collisionPosition = new Vector2(2.4f, 0); } else { collisionPosition = new Vector2(1.2f, 0); } }
public void InstantiatePlayer(SceneInjector passject, Transform incam) { sceneject = passject; MainCam = incam; //Input playerInput = new PlayerControls(); //playerInput.Debug.DieBind.performed += _ => PlayerDeath(); playerInput.Debug.DBGdmg.performed += _ => DebugModify(); playerInput.MovementMK.Interact.performed += _ => Interact(); playerInput.MovementMK.Reset.performed += ctx => Quit(); //DEBUG: originally in onenable, but the spawn method is a little odd to be sure. playerInput.Enable(); //Injection //sceneject.SceneJect += Injection; //sceneject.FixedSceneLoad += PlayerStart; LM = sceneject.Request <LevelManagement>(); pooler = sceneject.Request <Pooler>(); debugManager = sceneject.Request <DebugManager>(); //DEBUG: input state set, just for now. Eventually, legitimate start. inputState = InputState.Move; //Stats Subscription playerstat = this.GetComponent <StatsManager>(); //get player stats playerstat.onDeath += PlayerDeath; playerstat.HealthUpdate += UpdateHealth; playerstat.StatUpdate += UpdateStats; //load local. playerMove = this.GetComponent <ThirdPersonMovement>(); playerstat = this.GetComponent <StatsManager>(); playercomb = this.GetComponent <PlayerCombat>(); playerload = this.GetComponent <PlayerLoadout>(); PlayerStart(); }
private void Start() //Fix the BossEnemy adding stuff { GetLevelManagement = FindObjectOfType <LevelManagement>(); EagleBoss.transform.localScale = new Vector3(5, 5, 1); OpossumBoss.transform.localScale = new Vector3(5, 5, 1); FrogBoss.transform.localScale = new Vector3(5, 5, 1); EagleBoss.GetComponent <EnemyFollow>().Enemy_Health = 3; EagleBoss.GetComponent <EnemyFollow>().EnemySpeed = 1; EagleBoss.GetComponent <EnemyFollow>().EnemyToPlayer_Damage = 2; OpossumBoss.GetComponent <EnemyFollow>().Enemy_Health = 3; OpossumBoss.GetComponent <EnemyFollow>().EnemySpeed = 0.7f; OpossumBoss.GetComponent <EnemyFollow>().EnemyToPlayer_Damage = 3; FrogBoss.GetComponent <EnemyFollow>().Enemy_Health = 5; FrogBoss.GetComponent <EnemyFollow>().EnemySpeed = 0.4f; FrogBoss.GetComponent <EnemyFollow>().EnemyToPlayer_Damage = 2; StartCoroutine(Spawning()); }
// Use this for initialization void Awake() { //animator = GetComponent<Animator>(); rb = GetComponent <Rigidbody2D>(); //Adds itself to enemies list if (enemies == null) { enemies = new List <Enemy>(); } enemies.Add(this); //Gets LevelManager LevelManager = GameObject.FindObjectOfType <LevelManagement>(); //Flips Enemy if (!facingRight) { Vector3 rbLocalScaleX = GetComponent <Transform>().localScale; rbLocalScaleX.x *= -1; GetComponent <Transform>().localScale = rbLocalScaleX; } }
void Start() { levelGen = GetComponent <LevelManagement>(); }
// Use this for initialization void Start() { LevelManager = GameObject.FindObjectOfType <LevelManagement>(); }
private void Awake() { _management = new LevelManagement(this); _management.SpawnUnit(); }
private void Awake() { GetLevelManagement = FindObjectOfType <LevelManagement>(); EndGame_Text(); GetPlayer_Monster = FindObjectOfType <Player_Monster>(); }
// Use this for initialization void Start() { levelManagement = FindObjectOfType <LevelManagement>(); playerMovement = FindObjectOfType <PlayerMovement>(); targetPosition = wayPoints[waypointIndex].transform.position; }
private void Awake() { GetLevelManagement = FindObjectOfType <LevelManagement>(); audioSource = GetComponent <AudioSource>(); GetPlayerMovement = FindObjectOfType <PlayerMovement>(); }
private void Start() { lM = FindObjectOfType <LevelManagement>(); }
void Start() { levelManager = this; Load(); }
void Start() { levelManager = FindObjectOfType <LevelManagement> (); }
public Player() { level = new LevelManagement(this); }
public void Injection(InjectionDict ID) { LM = ID.Inject <LevelManagement>(); pooler = ID.Inject <Pooler>(); debugManager = ID.Inject <DebugManager>(); }
private void Awake() { lM = FindObjectOfType <LevelManagement>(); }