private void OnCollisionEnter(Collision dir) { print(dir.collider.name); hp hp = dir.collider.GetComponent <hp>(); hp.hps -= 2; }
void Awake() { partyNoteParent = GameObject.Find("PartyNote").transform; enemyNoteParent = GameObject.Find("EnemyNote").transform; //それぞれの変数にオブジェクトを格納する //enemySliderのhpスクリプトを取得 notes = GameObject.Find("enemySlider"); hp = notes.GetComponent <hp>(); //CharaStatusスクリプトを取得 CharaStatus = GetComponent <Charastatus>(); //partyNoteのnoteスクリプトを取得 partyNote = GameObject.Find("PartyNote"); note = partyNote.GetComponent <note>(); //Frequencyスクリプト取得 noteFrequency = partyNote.GetComponent <NoteFrequency>(); //TouchHanteiスクリプト取得 touchHantei = GetComponent <TouchHantei>(); //enemyNoteのenemynoteスクリプトを取得 enemyNote = GameObject.Find("EnemyNote"); enemynote = enemyNote.GetComponent <enemynote>(); //ScenairoTextのScenarioTextスクリプトを取得 text = GameObject.Find("ScenarioText"); scenarioText = text.GetComponent <ScenarioText>(); //ScenarioCharaのScenarioCharaスクリプトを取得 chara = GameObject.Find("Image"); scenarioChara = chara.GetComponent <ScinarioChara>(); //BGMスタート audioSource = GetComponent <AudioSource>(); }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "Player") { heal = other.GetComponent <hp>(); heal.AdjustCurrentHealth(dmg); } }
private void damageObject(float dmg, Collider other) { hp otherHP = other.GetComponent <hp>(); if (otherHP != null) { otherHP.takeDamage(dmg); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } about = (About)BLL.Product.GetAbout()[0]; hp = BLL.Product.GetHp()[0]; }
public void Awake() { credits = 5; agendaPts = 0; tags = 0; health = GameObject.FindObjectOfType(typeof(hp)) as hp; mem = 4; deck = buildDeck(); run = false; }
public void Pride() { if (Pri == 0) { cost = -500; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Pri = 1; }
public void SealOfSolomon() { if (Sea == 0) { cost = -500; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Sea = 1; }
public void Zypher() { if (Zyp == 0) { cost = -500; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Zyp = 1; }
public void Reservoir() { if (Res == 0) { cost = -1500; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Res = 1; }
public void Container() { if (Con == 0) { cost = -500; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Con = 1; }
public void LapusLazuli() { if (Lep == 0) { cost = -150; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Lep = 1; }
//Purchase Functions public void Ifrit() { if (Ifr == 0) { cost = -200; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); Setp.text = "Purchased"; Ifr = 1; } }
public void Lust() { if (Lus == 0) { cost = -500; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Lus = 1; }
public void Gluttony() { if (Glu == 0) { cost = -500; heal = PL.GetComponent <hp>(); heal.AdjustCurrentHealth(cost); } Setp.text = "Purchased"; Glu = 1; }
void Start() { action = true; change_action = true; actionType = actionTypes[0]; rotateType = "forward"; animator = GetComponent <Animator>(); HP = GetComponent <hp>(); findObjectByRay = GetComponent <FindObjectByRay>(); rb = GetComponent <Rigidbody> (); playerHight = GetComponent <BoxCollider>().size.y *transform.localScale.y; }
protected void Button1_OnClick(object sender, EventArgs e) { Tool.UpFile a = new UpFile(); hp hps = new hp() { hq_name = Name.Text, hq_emil = emlia.Text, hq_fax = Fox.Text, hq_phone = Phone.Text, hq_site = dis.Text, Img_url = a.upFileName(Image1, this.FileUpload1, "../img/") }; _ = BackStages.Upt.UptHp(hps) > 0 ? Tool.Tool.Alert("True", Hq.Img_url) : Tool.Tool.Alert("False"); }
// Use this for initialization void Start() { gameControler = GetComponent <GameControler>(); //partyNoteParent = GameObject.Find("PartyNote").transform; //enemyNoteParent = GameObject.Find("EnemyNote").transform; //それぞれの変数にオブジェクトを格納する //enemySliderのhpスクリプトを取得 notes = GameObject.Find("enemySlider"); hp = notes.GetComponent <hp>(); //CharaStatusスクリプトを取得 CharaStatus = GetComponent <Charastatus>(); //partyNoteのnoteスクリプトを取得 partyNote = GameObject.Find("PartyNote"); note = partyNote.GetComponent <note>(); //Frequencyスクリプト取得 noteFrequency = partyNote.GetComponent <NoteFrequency>(); //enemyNoteのenemynoteスクリプトを取得 enemyNote = GameObject.Find("EnemyNote"); enemynote = enemyNote.GetComponent <enemynote>(); //ScenairoTextのScenarioTextスクリプトを取得 text = GameObject.Find("ScenarioText"); scenarioText = text.GetComponent <ScenarioText>(); //ScenarioCharaのScenarioCharaスクリプトを取得 chara = GameObject.Find("Image"); scenarioChara = chara.GetComponent <ScinarioChara>(); //BGMスタート audioSource = GetComponent <AudioSource>(); if (BattleManager.Instance.nowBattleScene == 0) { return; } countDown = countDownText.GetComponent <CountDown>(); StartCoroutine(countDown.CountdownCoroutine()); tokagePlayMovie = tokageEF.GetComponent <PlayMovie>(); datyoPlayMovie = datyoEF.GetComponent <PlayMovie>(); momongaPlayMovie = momongaEF.GetComponent <PlayMovie>(); kamePlayMovie = kameEF.GetComponent <PlayMovie>(); enemyPlayMovie = enemyEF.GetComponent <PlayMovie>(); }
// Use this for initialization void Start() { Damage = Consts.BaseHerowDamage; healthStatus = GetComponentInChildren <hp>(); healthStatus.Init(Consts.BaseHerowHelth); }
void Awake() { instance = this; }
// Use this for initialization void Start() { source = GetComponent <AudioSource>(); pg = GameObject.Find("problems").GetComponent <problemGenerator>(); hp1 = GameObject.Find("HP1").GetComponent <hp> (); }