コード例 #1
0
    // Use this for initialization
    void Start()
    {
        hpManager = GameObject.Find("HP").GetComponent <HPManager> ();

        headSound = GameObject.Find("HeadSound").GetComponent <PlaySound> ();
        tailSound = GameObject.Find("TailSound").GetComponent <PlaySound> ();
    }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     rb                  = GetComponent <Rigidbody>();         //intialise RigidBody
     hPManager           = GetComponent <HPManager>();         //initialise hp manager
     pointsManager       = GetComponent <PointsManager>();     //initialise points manager
     gyroscopeController = GetComponent <GyroscopeMovement>(); //initialise gyroscope controller manager
 }
コード例 #3
0
ファイル: HealingHold.cs プロジェクト: uni101a/BolderingVR
 void Awake()
 {
     interactableObjectScript = GetComponent <VRTK_InteractableObject>();
     material     = GetComponent <Renderer>().material;
     scoreManager = ScoreManager.GetScoreInstance();
     hPManager    = HPManager.GetHPInstance();
 }
コード例 #4
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         HPManager.ChangHP(collision.gameObject.GetComponent <move>(), 1);
         Destroy(gameObject);
     }
 }
コード例 #5
0
ファイル: HPUIManager.cs プロジェクト: 84110/BattleArms
 void Start()
 {
     hp_manager_ = object_.GetComponent<HPManager>();
     image_ = GetComponent<Image>();
     rect_transform_ = GetComponent<RectTransform>();
     MAX_WIDTH = rect_transform_.rect.width;
     MAX_HP = hp_manager_.hp;
 }
コード例 #6
0
    void Start()
    {
        myChara    = GameObject.Find("MyChara");
        rivalChara = GameObject.Find("RivalChara");

        HPManager             = GameObject.Find("HPManager").GetComponent <HPManager>();
        damageEffectAnimation = GameObject.Find("DamageEffect").GetComponent <DamageEffectAnimation>();
    }
コード例 #7
0
ファイル: PlayerHit.cs プロジェクト: gustiir/Dinozards
    void Start()
    {
        playerHp  = GetComponent <HPManager>();
        rigidbody = GetComponent <Rigidbody>();
        states    = GetComponent <PlayerStates>();

        camera = GameObject.FindWithTag("Camera").GetComponent <MultipleTargetCamera>();
    }
コード例 #8
0
ファイル: HPManager.cs プロジェクト: uni101a/BolderingVR
    public static HPManager GetHPInstance()
    {
        if (hpInstance == null)
        {
            hpInstance = new HPManager();
        }

        return(hpInstance);
    }
コード例 #9
0
    public EnityManager()
    {
        GameObject gameObject = GameObject.Find("HPLayer");

        if (gameObject != null)
        {
            hpManager = gameObject.GetComponent <HPManager>();
        }
    }
コード例 #10
0
 // Use this for initialization
 void Start()
 {
     rigid = GetComponent <Rigidbody2D> ();
     hp    = transform.GetComponent <HPManager>();
     if (hp)
     {
         enemyHP = hp.HP;
     }
 }
コード例 #11
0
ファイル: AI2.cs プロジェクト: 84110/BattleArms
    // private bool isGround = false;

    //ゲーム開始時に一度
    void Start()
    {
        hp_manager_ = GetComponent<HPManager>();
        enemy_stater_ = GetComponent<EnemyStater>();

        //Playerオブジェクトを検索し、参照を代入
        player = GameObject.FindGameObjectWithTag("Player").transform;
        distance_state = DISTANCE_STATE.LONG;
        attack_state = ATTACK_STATE.WAIT;
    }
コード例 #12
0
ファイル: PlayerHealth.cs プロジェクト: Cubais/GameJam2021MFF
 void Start()
 {
     m_HPManager = HPManager.instance;
     m_HPManager.SetMaxHP(MaxHP);
     m_audioSource        = GetComponent <AudioSource>();
     m_playerHitSound     = Resources.Load("Audio/FX/hit/playerhit") as AudioClip;
     m_playerLevelUpSound = Resources.Load("Audio/FX/levelUp/141695__copyc4t__levelup") as AudioClip;
     m_playerDeathSound   = Resources.Load("Audio/FX/gameOver/415096__wolderado__game-over") as AudioClip;
     m_characterChange    = GetComponent <PlayerCharacterChange>();
 }
コード例 #13
0
//	PlayerManager playerManager;

    // Use this for initialization
    void Start()
    {
        scoreManager = GameObject.Find("Score").GetComponent <ScoreManager> ();
        hpManager    = GameObject.Find("HP").GetComponent <HPManager> ();

//		headSound = GameObject.Find ("HeadSound").GetComponent<PlaySound> ();
        tailSound = GameObject.Find("TailSound").GetComponent <PlaySound> ();

//		playerManager = GameObject.Find ("Player").GetComponent<PlayerManager> ();
    }
コード例 #14
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
コード例 #15
0
 private void Awake()
 {
     if (Instance)
     {
         Destroy(this);
     }
     else
     {
         Instance = this;
     }
 }
コード例 #16
0
ファイル: HPManager.cs プロジェクト: Cubais/GameJam2021MFF
 // Start is called before the first frame update
 void Awake()
 {
     if (!instance)
     {
         instance = this;
     }
     else
     {
         Debug.LogError("HP MANAGER ALREADY SET!");
     }
 }
コード例 #17
0
ファイル: PlayerAttacker.cs プロジェクト: 84110/BattleArms
    void Start()
    {
        hp_manager_ = GetComponent<HPManager>();

        player_controller_ = GetComponent<PlayerController>();
        player_moder_ = GetComponent<PlayerModer>();

        //back_weapon_ = back_weapon_object_.AddComponent<HomingGun>();
        //back_weapon_.SetType(WeaponType.BACK);
        //back_weapon_.SetReticle(reticle_);
    }
コード例 #18
0
 // Update is called once per frame
 void Update()
 {
     transform.localScale = new Vector3(scaleSize, scaleSize, scaleSize); ///なぜか拡大されて生成されるので
     if (statusCounter.hpCounter >= thisHpNum)
     {
         GameObject obj = Instantiate(HPBar, transform.position, Quaternion.identity);
         hPManager                = obj.GetComponent <HPManager>();
         obj.transform.parent     = hPBarHolder.transform;
         obj.transform.localScale = new Vector3(scaleSize, scaleSize, scaleSize);
         hPManager.thisHpNum      = thisHpNum;
         Destroy(gameObject);
     }
 }
コード例 #19
0
ファイル: PlayerRotater.cs プロジェクト: 84110/BattleArms
    void Start()
    {
        if (!isLocalPlayer) return;

        hp_manager_ = GetComponent<HPManager>();

        player_controller_ = GetComponent<PlayerController>();
        player_moder_ = GetComponent<PlayerModer>();

        var air_frame_parameter = FindObjectOfType<AirFrameParameter>();
        var id = GetComponent<Identificationer>().id;

        SWING_SPEED = air_frame_parameter.GetSwingSpeed(id);
    }
コード例 #20
0
    void Start()
    {
        distanceTravelled  = 0f;
        freezeTime         = 0f;
        slownessMultiplier = 1f;

        grid               = GameObject.FindWithTag("Road").GetComponentInParent <GridLayout>();
        tilemap            = GameObject.FindWithTag("Road").GetComponent <Tilemap>();
        pathEndPosition    = GameObject.FindWithTag("PathEnd").transform.position;
        hpManager          = GameObject.Find("HPManager").GetComponent <HPManager>();
        moneyManager       = GameObject.Find("MoneyManager").GetComponent <MoneyManager>();
        killCounterManager = GameObject.Find("KillCounterManager").GetComponent <KillCounterManager>();

        targetPosition = transform.position;
    }
コード例 #21
0
ファイル: PlayerMover.cs プロジェクト: ooHIROoo/BattleArms
    void Start()
    {
        if (!isLocalPlayer) return;

        hp_manager_ = GetComponent<HPManager>();

        player_controller_ = GetComponent<PlayerController>();
        player_moder_ = GetComponent<PlayerModer>();

        var air_frame_parameter = FindObjectOfType<AirFrameParameter>();
        var id = GetComponent<Identificationer>().id;

        MOVE_SPEED = air_frame_parameter.GetMoveSpeed(id);
        BOOST_POWER = air_frame_parameter.GetBoostPower(id);

        sound_manager_ = FindObjectOfType<SoundManager>();
    }
コード例 #22
0
ファイル: HPIconCreater.cs プロジェクト: ryohalon/PantuMan
    // Use this for initialization
    void Start()
    {
        hpManager = GetComponent<HPManager>();
        if(hpManager == null)
        {
            Debug.Log("hpManager is null");
        }

        for (int iconNumber = 0; iconNumber < HPManager.NowHP; ++iconNumber)
        {
            var clone = Instantiate(hpIconObj);
            clone.transform.SetParent(transform);
            clone.name = "HPIcon" + (iconNumber + 1);
            clone.transform.localScale = Vector3.one;
            clone.transform.localPosition = iconBasePosition - new Vector3(iconXDistance * iconNumber, 0f, 0f);
            clone.GetComponent<HPIconStateChecker>().DeadLineHP = iconNumber + 1;
        }
    }
コード例 #23
0
        private void UpdateTexts()
        {
            hpText.SetText($"xp: {HPManager.GetHP()}");
            levelText.SetText($"level: {LevelsManager.GetLevel()}");

            float hpWidth    = hpText.GetTextComponent().preferredWidth;
            float levelWidth = levelText.GetTextComponent().preferredWidth;

            float fullSize = hpWidth + knobWidth + levelWidth;

            float hpPos    = -fullSize / 2 + hpWidth / 2;
            float knobPos  = hpPos + hpWidth / 2 + knobWidth / 2;
            float levelPos = knobPos + knobWidth / 2 + levelWidth / 2;

            hpText.SetPositionX(hpPos);
            knob.SetPositionX(knobPos);
            levelText.SetPositionX(levelPos);
        }
コード例 #24
0
ファイル: PlayerJumper.cs プロジェクト: ooHIROoo/BattleArms
    void Start()
    {
        if (!isLocalPlayer) return;

        hp_manager_ = GetComponent<HPManager>();

        player_controller_ = GetComponent<PlayerController>();

        var air_frame_parameter = FindObjectOfType<AirFrameParameter>();
        var id = GetComponent<Identificationer>().id;

        JUMP_POWER = air_frame_parameter.GetJumpPower(id);

        rigidbody_ = GetComponent<Rigidbody>();

        player_moder_ = GetComponent<PlayerModer>();

        sound_manager_ = FindObjectOfType<SoundManager>();
    }
コード例 #25
0
ファイル: Power.cs プロジェクト: uni101a/BolderingVR
    void Start()
    {
        image     = transform.GetChild(0).GetComponent <Image>();
        powerText = transform.GetChild(1).GetComponent <Text>();
        hPManager = HPManager.GetHPInstance();

        if (this.name.Contains("left"))
        {
            controllerType = "left";
        }
        else if (this.name.Contains("right"))
        {
            controllerType = "right";
        }
        else
        {
            controllerType = "None";
        }
    }
コード例 #26
0
ファイル: GameManager.cs プロジェクト: uni101a/BolderingVR
 /**
  * Start()より先に呼ばれる
  * climbingStatusを初期化
  */
 void Awake()
 {
     climbingStatus = ClimbingStatus.GetInstance(playerClimbScript);
     hPManager      = HPManager.GetHPInstance();
     scoreManager   = ScoreManager.GetScoreInstance();
 }
コード例 #27
0
ファイル: GameManager.cs プロジェクト: uni101a/BolderingVR
 private void DestroySingleton()
 {
     TimeManager.DestroyInstance();
     HPManager.DestroyInstance();
     ClimbingStatus.DestroyInstance();
 }
コード例 #28
0
ファイル: HPManager.cs プロジェクト: cxz5309/EduQuiz
 private void OnDestroy()
 {
     instance = null;
 }
コード例 #29
0
 private void UpdateHpText()
 {
     hpText.SetText($"XP: {HPManager.GetHP()}");
 }
コード例 #30
0
ファイル: Head.cs プロジェクト: Paladin-Danse/3D-FPS
 // Use this for initialization
 void Start()
 {
     HPM = transform.parent.GetComponent <HPManager>();
 }
コード例 #31
0
ファイル: AI.cs プロジェクト: ooHIROoo/BattleArms
 void Start()
 {
     hp_manager_ = GetComponent<HPManager>();
     enemy_stater_ = GetComponent<EnemyStater>();
     DoPatrol();
 }
コード例 #32
0
 private void Start()
 {
     hpManager = netData.client.GetManager <HPManager>();
 }
コード例 #33
0
ファイル: HPManager.cs プロジェクト: uni101a/BolderingVR
 public static void DestroyInstance()
 {
     hpInstance = null;
 }
コード例 #34
0
ファイル: EffectCreater.cs プロジェクト: 84110/BattleArms
 void Start ()
 {
     is_effect_ = false;
     hp_manager_ = GetComponent<HPManager>();
     count_ = hp_manager_.hp;
 }
コード例 #35
0
ファイル: AirFrameDestoyer.cs プロジェクト: 84110/BattleArms
 void Start()
 {
     hp_manager_ = GetComponent<HPManager>();
 }
コード例 #36
0
 void Awake()
 {
     Instance = this;
     SetHPStats(5);
 }
コード例 #37
0
 private void UpdateProgress()
 {
     progressImage.fillAmount = (float)HPManager.GetCurrentProgress() / HPManager.GetMaxProgress();
     progressText.SetText($"{HPManager.GetCurrentProgress()}/{HPManager.GetMaxProgress()}");
 }
コード例 #38
0
 // Use this for initialization
 void Start()
 {
     playerHP = transform.parent.GetComponent<HPManager>();
 }
コード例 #39
0
ファイル: HPManager.cs プロジェクト: cxz5309/EduQuiz
    public int HP;                                     // 플레이어 HP 저장

    void Awake()
    {
        instance = this;
    }
コード例 #40
0
ファイル: AI2.cs プロジェクト: ooHIROoo/BattleArms
    //ゲーム開始時に一度
    void Start()
    {
        hp_manager_ = GetComponent<HPManager>();
        enemy_stater_ = GetComponent<EnemyStater>();

        //Playerオブジェクトを検索し、参照を代入
        player = GameObject.FindGameObjectWithTag("Player").transform;
        distance_state = DISTANCE_STATE.LONG;
        attack_state = ATTACK_STATE.WAIT;

        right_weapon_ = right_weapon_object_.GetComponentInChildren<Weapon>();
        left_weapon_ = left_weapon_object_.GetComponentInChildren<Weapon>();

        var id = GetComponent<Identificationer>().id;
        var air_frame_parameter = FindObjectOfType<AirFrameParameter>();
        speed = air_frame_parameter.GetMoveSpeed(id);
        JUMP_POWER = air_frame_parameter.GetJumpPower(id);
        BOOST_POWER = air_frame_parameter.GetBoostPower(id);

        foreach (var room in FindObjectsOfType<EnterRoom>())
        {
            if (room.transform.parent.name.GetHashCode() != roomName.GetHashCode()) continue;
            enter_room_ = room;
            Debug.Log(gameObject.name);
        }
    }
コード例 #41
0
ファイル: HPManager.cs プロジェクト: dogoo3/2021_1_Project
 private void Awake()
 {
     instance = this;
     ResetHP(); // 하트의 최대갯수 설정
 }