Exemplo n.º 1
0
    private void OnCollisionEnter(Collision dir)
    {
        print(dir.collider.name);
        hp hp = dir.collider.GetComponent <hp>();

        hp.hps -= 2;
    }
Exemplo n.º 2
0
 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>();
 }
Exemplo n.º 3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         heal = other.GetComponent <hp>();
         heal.AdjustCurrentHealth(dmg);
     }
 }
Exemplo n.º 4
0
    private void damageObject(float dmg, Collider other)
    {
        hp otherHP = other.GetComponent <hp>();

        if (otherHP != null)
        {
            otherHP.takeDamage(dmg);
        }
    }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         return;
     }
     about = (About)BLL.Product.GetAbout()[0];
     hp    = BLL.Product.GetHp()[0];
 }
Exemplo n.º 6
0
 public void Awake()
 {
     credits   = 5;
     agendaPts = 0;
     tags      = 0;
     health    = GameObject.FindObjectOfType(typeof(hp)) as hp;
     mem       = 4;
     deck      = buildDeck();
     run       = false;
 }
Exemplo n.º 7
0
 public void Pride()
 {
     if (Pri == 0)
     {
         cost = -500;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Pri       = 1;
 }
Exemplo n.º 8
0
 public void SealOfSolomon()
 {
     if (Sea == 0)
     {
         cost = -500;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Sea       = 1;
 }
Exemplo n.º 9
0
 public void Zypher()
 {
     if (Zyp == 0)
     {
         cost = -500;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Zyp       = 1;
 }
Exemplo n.º 10
0
 public void Reservoir()
 {
     if (Res == 0)
     {
         cost = -1500;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Res       = 1;
 }
Exemplo n.º 11
0
 public void Container()
 {
     if (Con == 0)
     {
         cost = -500;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Con       = 1;
 }
Exemplo n.º 12
0
 public void LapusLazuli()
 {
     if (Lep == 0)
     {
         cost = -150;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Lep       = 1;
 }
Exemplo n.º 13
0
 //Purchase Functions
 public void Ifrit()
 {
     if (Ifr == 0)
     {
         cost = -200;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
         Setp.text = "Purchased";
         Ifr       = 1;
     }
 }
Exemplo n.º 14
0
 public void Lust()
 {
     if (Lus == 0)
     {
         cost = -500;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Lus       = 1;
 }
Exemplo n.º 15
0
 public void Gluttony()
 {
     if (Glu == 0)
     {
         cost = -500;
         heal = PL.GetComponent <hp>();
         heal.AdjustCurrentHealth(cost);
     }
     Setp.text = "Purchased";
     Glu       = 1;
 }
Exemplo n.º 16
0
    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;
    }
Exemplo n.º 17
0
        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");
        }
Exemplo n.º 18
0
    // 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>();
    }
Exemplo n.º 19
0
 // Use this for initialization
 void Start()
 {
     Damage       = Consts.BaseHerowDamage;
     healthStatus = GetComponentInChildren <hp>();
     healthStatus.Init(Consts.BaseHerowHelth);
 }
Exemplo n.º 20
0
 void Awake()
 {
     instance = this;
 }
Exemplo n.º 21
0
 // Use this for initialization
 void Start()
 {
     source = GetComponent <AudioSource>();
     pg     = GameObject.Find("problems").GetComponent <problemGenerator>();
     hp1    = GameObject.Find("HP1").GetComponent <hp> ();
 }