// Use this for initialization void Start() { healthButton.onClick.AddListener(BuyHealth); dammageButton.onClick.AddListener(BuyDammage); shootSpeedButton.onClick.AddListener(ButSpeed); shop = this; UpdateGUI(); }
public SupplierPlayer(string name, float money, float markup, float maximumInventorySpace, int shopItemSlotCount) : base(name) { Money = money; MarkupPercentage = markup; CustomerTolerance = 1f; WarehouseInventory = new InventoryPlayer(maximumInventorySpace); Shop = new PlayerShop(shopItemSlotCount); ResetMoneyStart(); }
void OnTriggerExit2D(Collider2D other) { if (other.tag == "Player") { PlayerShop shop = other.gameObject.GetComponent <PlayerShop> (); if (shop != null) { shop.DisableBuy(); } } }
// Use this for initialization // void Start () { // // } // Update is called once per frame // void Update () { // // } void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { PlayerShop shop = other.gameObject.GetComponent <PlayerShop> (); if (shop != null) { shop.EnableBuy(petForSale, price); } } }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this.gameObject); } }
private void Awake() { Instance = this; playerBase = GetComponent <Player_Base>(); playerPunch = GetComponent <PlayerPunch>(); playerSword = GetComponent <PlayerSword>(); playerBase.enabled = true; playerPunch.enabled = false; playerSword.enabled = false; healthPotionAmount = 1; }
// Update is called once per frame void Update() { gun.dammage = PlayerShop.GetDammage(); gun.fireSpeed = 1 / (Mathf.Log(5 + PlayerShop.GetSpeed())); if (isShooting) { gun.gameObject.SendMessage("Shoot"); } /* * if (gun.GetIsAutomatic()) * { * * * } * else { * if (Input.GetMouseButtonDown(0)){ * gun.gameObject.SendMessage("Shoot"); * } * } */ }
// Use this for initialization void Start() { shop = GetComponent <PlayerShop> (); playerBody = GetComponent <Rigidbody2D> (); networkInfo = GetComponent <NetSetup> (); carryControl = GetComponent <CarryControl> (); anim = GetComponent <Animator> (); gravityInitial = playerBody.gravityScale; wallCheck = GetComponentInChildren <WallCheck> (); baitManager = GetComponent <BaitManager> (); string[] controllers = Input.GetJoystickNames(); foreach (string s in controllers) { Debug.Log(s); } if (controllers.Length > 0) { controllerEnabled = true; } input = new GeneralInput(); input.controllerEnabled = controllerEnabled; // // superJumpModeText = GameObject.Find ("PowerJumpMode").GetComponent<Text> (); }
// Use this for initialization void Start () { shop = GetComponent<PlayerShop> (); playerBody = GetComponent<Rigidbody2D> (); networkInfo = GetComponent<NetSetup> (); carryControl = GetComponent<CarryControl> (); anim = GetComponent<Animator> (); gravityInitial = playerBody.gravityScale; wallCheck = GetComponentInChildren<WallCheck> (); baitManager = GetComponent<BaitManager> (); string[] controllers = Input.GetJoystickNames (); foreach (string s in controllers) { Debug.Log (s); } if (controllers.Length > 0) { controllerEnabled = true; } input = new GeneralInput (); input.controllerEnabled = controllerEnabled; // // superJumpModeText = GameObject.Find ("PowerJumpMode").GetComponent<Text> (); }
private void Awake() { playerShop = DataPlayer.GetModule <PlayerShop>(); InitButtons(); InitLocalize(); }
void Awake() { Instance = this; pDeck = PlayerCardDeck.Instance; spawnManager = SpawnManager.Instance; }
// Update is called once per frame void Update() { maxHealth = PlayerShop.GetHealth(); }
// Use this for initialization void Start() { maxHealth = PlayerShop.GetHealth(); currentHealth = maxHealth; }