void Start() { UpdateWaterText(); playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); // record position when scene starts startPosition = transform.position; }
// Use this for initialization void Start() { playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); playerInventoryDisplay.OnChangeInventory(items); //인벤토리 초기값 설정 inventory_c.position = new Vector3(658.45f, 46.25f, 0); //아이템 이미지 체크x item_gun.gameObject.SetActive(false); item_key.gameObject.SetActive(false); item_pet.gameObject.SetActive(false); }
protected override void DoAction(Player player) { isUsed = true; transform.SetParent(null); PlayerStatsDisplay display = PlayerStatsDisplay.Instance; PlayerInventoryDisplay inv = PlayerInventoryDisplay.Instance; switch (pickup) { case PickupType.LIFE: player.Stats.AddToLife(amount); StartCoroutine(Util.FlyTo(renderer, this.gameObject, display.LifeIcon)); break; case PickupType.POWER: player.Stats.AddToPower(amount); StartCoroutine(Util.FlyTo(renderer, this.gameObject, display.PowerIcon)); break; case PickupType.DEFENSE: player.Stats.AddToDefense(amount); StartCoroutine(Util.FlyTo(renderer, this.gameObject, display.DefenseIcon)); break; case PickupType.EXPERIENCE: player.Stats.AddToExperience(amount); StartCoroutine(Util.FlyTo(renderer, this.gameObject, display.ExperienceIcon)); break; case PickupType.YELLOW_KEY: player.Keys.Yellow += amount; StartCoroutine(Util.FlyTo(renderer, this.gameObject, inv.GoldIcon)); break; case PickupType.BLUE_KEY: player.Keys.Blue += amount; StartCoroutine(Util.FlyTo(renderer, this.gameObject, inv.BlueIcon)); break; case PickupType.RED_KEY: player.Keys.Red += amount; StartCoroutine(Util.FlyTo(renderer, this.gameObject, inv.RedIcon)); break; } enabled = false; }
//------------------------ // cache a reference to the PlayerInventoryDisplay object // that is in the parent GameObject // // and then ensure UI display matches this initial state // of whether we are carrying a star or not void Start() { playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); playerInventoryDisplay.OnChangeCarryingStar(carryingStar); }
void Start() { playerInventoryDisplay = GetComponent<PlayerInventoryDisplay>(); playerInventoryDisplay.OnChangeInventory(inventory); }
//------------------------ // cache a reference to the PlayerInventoryDisplay object // that is in the parent GameObject // // and then ensure UI display matches this initial state // of whether we are carrying a star or not void Start() { playerInventoryDisplay = GetComponent<PlayerInventoryDisplay>(); playerInventoryDisplay.OnChangeCarryingStar(carryingStar); }
void Start() { UpdatePattyText(); playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); }
// Use this for initialization void Start() { playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); playerInventoryDisplay.OnChangeInventory(items); }
//----------------------------- void Start() { // get reference to instance of PlayerInventoryDisplay in parent GameObject playerInventoryDisplay = GetComponent<PlayerInventoryDisplay>(); }
//---------------------------------- // get reference to display scripted instance object // and tell it to display the inital 'starTotal' void Start() { playerInventoryDisplay = GetComponent<PlayerInventoryDisplay>(); playerInventoryDisplay.OnChangeStarTotal(starTotal); }
// Use this for initialization void Start() { playerInventoryDisplay = this.gameObject.GetComponent <PlayerInventoryDisplay>(); }
private int totalStars = 0; void Start() { playerInventoryDisplay = GetComponent <PlayerInventoryDisplay> (); }
void Start() { playerInventoryDisplay = GetComponent<PlayerInventoryDisplay>(); }
private void Awake() { // Gets the player inventory display script component _playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); }
//------------------------ // cache a reference to the PlayerInventoryDisplay object // that is in the parent GameObject void Awake() { playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); }
void Start() { playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); }
// Start is called just before any of the Update methods is called the first time void Start() { playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); playerInventoryDisplay.OnChangeStarTotal(starTotal); }
//----------------------------- void Start() { // get reference to instance of PlayerInventoryDisplay in parent GameObject playerInventoryDisplay = GetComponent <PlayerInventoryDisplay>(); }