private void Start() { girlController = FindObjectOfType <GirlController>(); outlined = GetComponent <Outlined>(); player = FindObjectOfType <Player>(); isUsed = false; }
// Initialize void Awake() { // singleton if (instance == null) { instance = this; } else if (instance != this) { Destroy(this.gameObject); } // Initialize // // skill list if (skillList == null) { skillList = new List <Knowledge>(); } // ally list if (allyList == null) { allyList = new List <BattleNPC>(); } // item list if (itemList == null) { itemList = new List <Item>(); } }
// Use this for initialization void Start() { animator = GetComponent <Animator> (); girl = FindObjectOfType <GirlController> (); isWalking = true; }
// Use this for initialization void Start() { if (girlController == null) { girlController = transform.parent.GetComponentInChildren <GirlController>(); } }
// check if girl emotion stable void CheckUncontrollableAction() { // cache Girl controller GirlController girl = GirlController.Instance; // check eq level float girlEmotion = girl.GetEmotionLevel(); // if eq level higher or equal to x if (girlEmotion >= GirlController.MAX_EMOTIONLEVEL) { if (girl.GetEmotionType() == EmotionType.ANGRY) { myAction[indexOfAction] = new UncontrollableAngry(); } else if (girl.GetEmotionType() == EmotionType.HAPPY) { myAction[indexOfAction] = new UncontrollableHappy(); } else if (girl.GetEmotionType() == EmotionType.SAD) { myAction[indexOfAction] = new UncontrollableSad(); } else if (girl.GetEmotionType() == EmotionType.SCARE) { myAction[indexOfAction] = new UncontrollableScare(); } // disable choose ally and choose action currentState = SelectionState.UNCONTROLLABLE; // skip to battle phase and disable this script GameStateManager.Instance.SetGameState(GameState.BATTLE_PHASE); this.enabled = false; } }
// Use this for initialization void Start() { if (girlController == null) { girlController = transform.parent.GetComponentInChildren<GirlController>(); } }
void Awake() { if (m_GirlController == null) { GameObject Girl = GameObject.FindGameObjectWithTag("Girl"); if (Girl != null) { m_GirlController = Girl.GetComponent <GirlController>(); } else { Debug.Log("GameObject(Player) not found in HitInspector.cs:start()!"); } } if (m_PlayerController == null) { GameObject player = GameObject.FindGameObjectWithTag("Player"); if (player != null) { m_PlayerController = player.GetComponent <PlayerController>(); } else { Debug.Log("GameObject(Player) not found in HitInspector.cs:start()!"); } } }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); playerLives = player.GetComponent <Lifes>(); playerContr = player.GetComponent <GirlController>(); Invoke("StopLevel", timeToBoss); }
void Awake() { Phone = GameObject.FindWithTag("PhoneMenu"); conversant = GetComponent <AIConversant>(); //Loading = GameObject.FindWithTag("GameController").GetComponent<LoadingScreenScript>(); girlController = GameObject.FindWithTag("GameController").GetComponent <GirlController>(); girlManager = GameObject.FindWithTag("GirlContainer").GetComponent <GirlManager>(); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); playerLives = player.GetComponent<Lifes>(); playerContr = player.GetComponent<GirlController>(); Invoke("StopLevel", timeToBoss); }
private void Awake() { girl = GirlController.Instance; // set this to girl controller girl.SetMovementController(this); // cache game state manager gsm = GameStateManager.Instance; // cache rigid body rb2d = GetComponent <Rigidbody2D>(); }
// Start is called before the first frame update void Start() { int date; GirlController controller = GetComponent <GirlController>(); date = controller.GetDateLevel(); if (date > 2) { AIConversant Conversant = GetComponent <AIConversant>(); Conversant.SetNewDialog(dialogue); } }
private void Awake() { // cache girl controller girl = GirlController.Instance; // cache game state manager gsm = GameStateManager.Instance; // link to girl girl.SetBattleEndController(this); this.enabled = false; }
private void Awake() { // cache girl girl = GirlController.Instance; // initiate sprite renderer mySprites = new SpriteRenderer[actionObjects.Length]; // cache sprite renderer for (int i = 0; i < actionObjects.Length; i++) { mySprites[i] = actionObjects[i].GetComponent <SpriteRenderer>(); } }
// Use this for initialization void Start() { animator = GetComponent <Animator> (); lightSwitches = FindObjectsOfType <LampSwitch> (); liftSigns = FindObjectsOfType <LiftSign> (); hallElevator = FindObjectOfType <HallElevator> (); camera = FindObjectOfType <CameraController> (); girl = FindObjectOfType <GirlController> (); TurnOnLights(false); charger.intensity = 0; }
// knowledge selection void SelectKnowledge() { // clear selected knowledge selectedKnowledge = null; GirlController girl = GirlController.Instance; // activate skill selection objects skillSelectionEffectController.ActivateSpriteObjects(); if (Input.GetKeyDown(KeyCode.UpArrow)) { if (knowledgeIndex == 0) { // knowledgeIndex = girl.GetSkillList().Count - 1; // stop at index 0 knowledgeIndex = 0; } else { knowledgeIndex--; } } else if (Input.GetKeyDown(KeyCode.DownArrow)) { if (knowledgeIndex == girl.GetSkillList().Count - 1) { // knowledgeIndex = 0; // stop at last index knowledgeIndex = girl.GetSkillList().Count - 1; } else { knowledgeIndex++; } } // pass in knowledge index into skillSelectionEffectController skillSelectionEffectController.ChangeSprite(knowledgeIndex); // select skill/knowledge if (Input.GetKeyDown(KeyCode.Z)) { // Use Knowledge myAction[indexOfAction] = new UseKnowledge(selectedAlly, selectedKnowledge); selectedKnowledge = girl.GetSkillList()[knowledgeIndex]; skillSelectionEffectController.DeactivateSpriteObjects(); currentState = SelectionState.TARGET; } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(this.gameObject); } cam = Camera.main; // cache girl controller girl = GirlController.Instance; }
private void Start() { // Get spawned girl obect GameObject girlContainer = GameObject.FindWithTag("GirlContainer"); if (girlContainer.transform.childCount == 0) { return; } GameObject charPrefab = girlContainer.transform.GetChild(0).gameObject; girlInflation = charPrefab.GetComponent <GirlInflation>(); girlController = charPrefab.GetComponent <GirlController>(); }
private void Awake() { // get girl controller girl = GirlController.Instance; // initialize the slot content myKnowledge = new Knowledge(myID, myName, myDescription, myElement, myType, myValue, mySprite); // link sprite to img myImage = gameObject.GetComponent <Image>(); myImage.sprite = mySprite; // add to knowledgeSlotInterface list // assuming it will auto update when this script value is changed // for saving the data, telling data which has activated // awake initialize got problem, set to manual drag to list for now // girl.GetKnowledgeSlotInterface().AddToList(myID, this); }
/// <summary> /// initialize object variance /// </summary> void Start() { dataController = FindObjectOfType <DataController>(); correct = GetComponent <AudioSource>(); currentRoundData = dataController.GetCurrentRoundData(); questionPool = currentRoundData.questions; characterHealth = FindObjectOfType <CharacterHealth>(); characterController = FindObjectOfType <CharacterController>(); girlHealth = FindObjectOfType <GirlHealth>(); girlController = FindObjectOfType <GirlController>(); //ShowQuestion(); }
private void Awake() { // cache girl girl = GirlController.Instance; // initiate sprite renderer skillSprites = new SpriteRenderer[skillObjects.Length]; // calculate mid point midPoint = skillObjects.Length / 2; // cache sprite renderer for (int i = 0; i < skillObjects.Length; i++) { skillSprites[i] = skillObjects[i].GetComponent <SpriteRenderer>(); } // cache girl skill list skills = girl.GetSkillList(); }
void Awake () { if (m_GirlController == null) { GameObject Girl = GameObject.FindGameObjectWithTag("Girl"); if (Girl != null) { m_GirlController = Girl.GetComponent<GirlController>(); } else Debug.Log("GameObject(Player) not found in HitInspector.cs:start()!"); } if (m_PlayerController == null) { GameObject player = GameObject.FindGameObjectWithTag("Player"); if (player != null) { m_PlayerController = player.GetComponent<PlayerController>(); } else Debug.Log("GameObject(Player) not found in HitInspector.cs:start()!"); } }
public void UseCharm(Transform target) { current_amount++; GirlController girlController = GetComponent <GirlController>(); girlController.ChangeState(GirlState.Wait); if (current_amount > max_amount) { Charm delete_charm = charmList[0]; charmList.RemoveAt(0); delete_charm.DeleteCharm(); current_amount--; } Charm newCharm = Instantiate(charm, target.position, Quaternion.identity, target.transform); newCharm.c_obj = target.gameObject.GetComponent <CharmableObject>(); charmList.Add(newCharm); newCharm.CharmEffect(); girlController.ChangeTarget(); girlController.ChangeState(GirlState.Follow); }
private void Awake() { girl = GirlController.Instance; }
public virtual void Start() { gc = GetComponent<GirlController>(); animator = GetComponentInChildren<Animator>(); }
private void Awake() { conversant = GetComponent <AIConversant>(); girlController = GetComponent <GirlController>(); }
private void Awake() { girl = GirlController.Instance; girl.SetBattlePhaseController(this); }
private void Awake() { conversant = GetComponent <AIConversant>(); girlController = GetComponent <GirlController>(); musicSource = GameObject.FindWithTag("MainCamera").GetComponent <AudioSource>(); }
// Use this for initialization void Awake() { controller = transform.parent.GetComponent<BaseController>(); combo = transform.parent.GetComponent<Combo>(); gc = transform.parent.GetComponent<GirlController>(); }