Inheritance: MonoBehaviour
Beispiel #1
0
    void Start()
    {
        this.gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
        this.status         = this.GetComponent <CharacterStatus>();
        this.charaAnimation = this.GetComponent <CharaAnimation>();
        this.inputManager   = FindObjectOfType <InputManager>();
        this.targetCursor   = FindObjectOfType <TargetCursor>();
        this.targetCursor.SetPosition(this.transform.position);

        this.deathSeAudio      = this.gameObject.AddComponent <AudioSource>();
        this.deathSeAudio.clip = this.deathSeClip;
        this.deathSeAudio.loop = false;

        // Assert
        if (this.gameRuleCtrl == null)
        {
            Debug.LogError("Not found 'GameRuleCtrl' object.");
        }
        if (this.status == null)
        {
            Debug.LogError("Not found 'CharacterStatus' component.");
        }
        if (this.charaAnimation == null)
        {
            Debug.LogError("Not found 'CharaAnimation' component.");
        }
        if (this.inputManager == null)
        {
            Debug.LogError("Not found 'InputManager' object.");
        }
    }
Beispiel #2
0
    State nextState = State.Walking;    // 다음 스테이트.


    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        inputManager   = FindObjectOfType <InputManager>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
    }
Beispiel #3
0
    public GameObject lastBeatEffect;    //ラストビートのえふぇくと

    void Start()
    {
        status         = this.GetComponent <CharacterStatus>();
        charaAnimation = this.GetComponent <CharaAnimation>();
        inputManager   = FindObjectOfType <InputManager>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
        camera         = FindObjectOfType <FollowCamera>();
        //ターゲットマーカー
        targetCursor = FindObjectOfType <TargetCursor>();
        targetCursor.SetPosition(transform.position);

        //ジョイスティック
        joystick = FindObjectOfType <Joystick>();

        damageSeAudio          = gameObject.AddComponent <AudioSource>();
        damageSeAudio.clip     = damageSeClip;
        damageSeAudio.loop     = false;
        damageSeAudio.volume   = 0.2f;
        magicSeAudio           = gameObject.AddComponent <AudioSource>();
        magicSeAudio.clip      = magicSeClip;
        magicSeAudio.loop      = false;
        magicSeAudio.volume    = 0.2f;
        abilitySeAudio         = gameObject.AddComponent <AudioSource>();
        abilitySeAudio.clip    = abilitySeClip;
        abilitySeAudio.loop    = false;
        abilitySeAudio.volume  = 0.2f;
        ability2SeAudio        = gameObject.AddComponent <AudioSource>();
        ability2SeAudio.clip   = abilitySeClip;
        ability2SeAudio.loop   = false;
        ability2SeAudio.volume = 0.2f;

        ReactLine = status.MaxHP * ReactLine;
    }
Beispiel #4
0
    State nextState = State.Walking;    // 다음 스테이트.


    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        inputManager   = FindObjectOfType <InputManager>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
        targetCursor   = FindObjectOfType <TargetCursor>();
        targetCursor.SetPosition(transform.position);
    }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        this.inputManager   = FindObjectOfType <InputManager> ();
        this.charaAnimation = GetComponent <CharaAnimation> ();
        this.status         = GetComponent <CharacterStatus> ();
        this.gameRuleCtrl   = FindObjectOfType <GameRuleCtrl> ();

        this.gameRuleCtrl.UpdatePlayerHP(this.status.HP);
    }
Beispiel #6
0
    // Use this for initialization
    void Start()
    {
        this.gameRuleCtrl = FindObjectOfType <GameRuleCtrl> ();
        this.status       = GetComponent <CharacterStatus>();
        charaAnimation    = GetComponent <CharaAnimation>();
        characterMove     = GetComponent <CharacterMove>();

        basePosition = transform.position;
        waitTime     = waitBaseTime;
    }
Beispiel #7
0
 void Start()
 {
     this.gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
     this.status         = this.GetComponent <CharacterStatus>();
     this.charaAnimation = this.GetComponent <CharaAnimation>();
     this.characterMove  = this.GetComponent <CharacterMove>();
     // 初期位置を保持
     this.basePosition = this.transform.position;
     // 待機時間
     this.waitTime = this.waitBaseTime;
 }
Beispiel #8
0
    State nextState = State.Walking;            // 다음 스테이트.


    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        characterMove  = GetComponent <CharacterMove>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
        // 초기 위치를 저장한다.
        basePosition = transform.position;
        // 대기 시간.
        waitTime = waitBaseTime;
    }
Beispiel #9
0
    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        characterMove  = GetComponent <CharacterMove>();
        // 初期位置を保持
        basePosition = transform.position;
        // 待機時間
        waitTime = waitBaseTime;

        gameRuleCtrl = FindObjectOfType <GameRuleCtrl>();
    }
Beispiel #10
0
    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        inputManager   = FindObjectOfType <InputManager>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
        targetCursor   = FindObjectOfType <TargetCursor>();
        targetCursor.SetPosition(transform.position);

        // 오디오 초기화.
        deathSeAudio      = gameObject.AddComponent <AudioSource>();
        deathSeAudio.loop = false;
        deathSeAudio.clip = deathSeClip;
    }
Beispiel #11
0
    // Use this for initialization
    void Start()
    {
        GET("https://cedec2015.seccon.jp/cedec2015/GameCtrl/");

        int my_score = GameRuleCtrl.get_score();

        my_score_str = "Your Time: " + my_score.ToString();

        playername = TitleSceneCtrl.get_playername();
        if (my_score != -1)
        {
            playername += GameRuleCtrl.get_gamecookie();
        }
    }
Beispiel #12
0
    void OnGUI()
    {
        // 해상도 대응.
        GUI.matrix = Matrix4x4.TRS(
            Vector3.zero,
            Quaternion.identity,
            new Vector3(Screen.width / baseWidth, Screen.height / baseHeight, 1f));

        GameRuleCtrl gameRuleCtrl = FindObjectOfType(typeof(GameRuleCtrl)) as GameRuleCtrl;

        if (gameRuleCtrl.player != null)
        {
            playerStatus = gameRuleCtrl.player.GetComponent <CharacterStatus>();
            // 스테이터스.
            DrawPlayerStatus();
            DrawEnemyStatus();
        }
    }
Beispiel #13
0
    State nextState = State.Walking;    // 次のステート.


    // Use this for initialization
    void Start()
    {
        //text = GameObject.Find("DebugDamageView").GetComponent<Text>();
        MaxHPText      = GameObject.Find("DebugMaxHPView").GetComponent <Text>();
        HPText         = GameObject.Find("DebugHPView").GetComponent <Text>();
        status         = GetComponent <EnemyStatus>();
        charaAnimation = GetComponent <EnemyAnimation>();
        characterMove  = GetComponent <EnemyMove>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
        gameMaster     = FindObjectOfType <GameMasterScript>();
        // 初期位置を保持
        basePosition = transform.position;
        // 待機時間
        waitTime = waitBaseTime;

        damageSeAudio        = gameObject.AddComponent <AudioSource>();
        damageSeAudio.clip   = damageSeClip;
        damageSeAudio.loop   = false;
        damageSeAudio.volume = 0.05f;
    }
    // Use this for initialization
    void Start()
    {
        this.gameRuleCtrl = FindObjectOfType<GameRuleCtrl> ();
        this.status = GetComponent<CharacterStatus>();
        charaAnimation = GetComponent<CharaAnimation>();
        characterMove = GetComponent<CharacterMove>();

        basePosition = transform.position;
        waitTime = waitBaseTime;
    }
Beispiel #15
0
 // Use this for initialization
 void Start()
 {
     status = GetComponent<CharacterStatus>();
     charaAnimation = GetComponent<CharaAnimation>();
     inputManager = FindObjectOfType<InputManager>();
     gameRuleCtrl = FindObjectOfType<GameRuleCtrl>();
 }
Beispiel #16
0
 void Awake()
 {
     this.gameRuleCtrl = FindObjectOfType <GameRuleCtrl>();
 }
    // Use this for initialization
    void Start()
    {
        this.inputManager = FindObjectOfType<InputManager> ();
        this.charaAnimation = GetComponent<CharaAnimation> ();
        this.status = GetComponent<CharacterStatus> ();
        this.gameRuleCtrl = FindObjectOfType<GameRuleCtrl> ();

        this.gameRuleCtrl.UpdatePlayerHP (this.status.HP);
    }
Beispiel #18
0
 void Awake()
 {
     gameRuleCtrl = GameObject.FindObjectOfType(typeof(GameRuleCtrl)) as GameRuleCtrl;
 }
Beispiel #19
0
 // Use this for initialization
 void Start()
 {
     status = GetComponent<CharacterStatus>();
     charaAnimation = GetComponent<CharaAnimation>();
     inputManager = FindObjectOfType<InputManager>();
     gameRuleCtrl = FindObjectOfType<GameRuleCtrl>();
     targetCursor = FindObjectOfType<TargetCursor>();
     targetCursor.SetPosition(transform.position);
 }
Beispiel #20
0
 void Awake()
 {
     gameRuleCtrl = GameObject.FindObjectOfType(typeof(GameRuleCtrl)) as GameRuleCtrl;
     gameOverImage.SetActive(false);
     gameClearImage.SetActive(false);
 }
Beispiel #21
0
    // Use this for initialization
    void Start()
    {
        status = GetComponent<CharacterStatus>();
        charaAnimation = GetComponent<CharaAnimation>();
        inputManager = FindObjectOfType<InputManager>();
        gameRuleCtrl = FindObjectOfType<GameRuleCtrl>();
        targetCursor = FindObjectOfType<TargetCursor>();
        targetCursor.SetPosition(transform.position);

        // 오디오 초기화.
        deathSeAudio = gameObject.AddComponent<AudioSource>();
        deathSeAudio.loop = false;
        deathSeAudio.clip = deathSeClip;
    }
Beispiel #22
0
 // Use this for initialization
 void Start()
 {
     status = GetComponent<CharacterStatus>();
     charaAnimation = GetComponent<CharaAnimation>();
     characterMove = GetComponent<CharacterMove>();
     gameRuleCtrl = FindObjectOfType<GameRuleCtrl>();
     // 초기 위치를 저장한다.
     basePosition = transform.position;
     // 대기 시간.
     waitTime = waitBaseTime;
 }
Beispiel #23
0
 void Awake()
 {
     gameRuleCtrl = (GameRuleCtrl)GameObject.FindObjectOfType(typeof(GameRuleCtrl));
 }
Beispiel #24
0
 void Awake()
 {
     gameRuleCtrl = GameObject.FindObjectOfType(typeof(GameRuleCtrl)) as GameRuleCtrl;
 }
Beispiel #25
0
 // Use this for initialization
 void Start()
 {
     gameRuleCtrl = gameRuleObj.GetComponent <GameRuleCtrl>();
     timerText    = this.GetComponent <Text>();
     setCurrentTimeText();
 }