Inheritance: MonoBehaviour
Esempio n. 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.");
        }
    }
Esempio n. 2
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;
    }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     status = GetComponent<CharacterStatus>();
     charaAnimation = GetComponent<CharaAnimation>();
     inputManager = FindObjectOfType<InputManager>();
     gameRuleCtrl = FindObjectOfType<GameRuleCtrl>();
 }
Esempio n. 4
0
    State nextState = State.Walking;    // 다음 스테이트.


    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        inputManager   = FindObjectOfType <InputManager>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
    }
Esempio n. 5
0
    State nextState = State.Walking;            // 다음 스테이트.

    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        characterMove  = GetComponent <CharacterMove>();
        basePosition   = transform.position;
        waitTime       = waitBaseTime;
    }
Esempio n. 6
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);
    }
Esempio n. 7
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);
    }
Esempio n. 8
0
 public void Copy(BasicCard card)
 {
     charaAnimation = card.GetCharaAnimation();
     cardName       = card.GetCardName();
     sentence       = card.sentence;
     levelSentence  = card.levelSentence;
     level          = card.level;
     cost           = card.cost;
     UpdateView();
 }
Esempio n. 9
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;
    }
Esempio n. 10
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;
    }
Esempio n. 11
0
 //ゲーム開始時の初期化
 public void Initialize(string _myName)
 {
     charaAnimation = GetComponent <CharaAnimation>();
     myName         = _myName;
     life           = paraTable.lifeScale * lifePoint;
     maxLife        = life;
     attack         = paraTable.attackScale * attackPoint;
     defense        = paraTable.defenseScale * defensePoint;
     //Debug.Log(owner+" life:"+life+" attack:"+attack+" defense:"+defense);
     lifeGauge.Initialize(life, life);
 }
Esempio n. 12
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;
 }
Esempio n. 13
0
    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        characterMove  = GetComponent <CharacterMove>();
        // 初期位置を保持
        basePosition = transform.position;
        // 待機時間
        waitTime = waitBaseTime;

        gameRuleCtrl = FindObjectOfType <GameRuleCtrl>();
    }
Esempio n. 14
0
 private void Start()
 {
     objName   = this.gameObject.name;
     noteSpeed = NoteSpeeds();
     Debug.Log(noteSpeed);
     GameControler  = GameObject.Find("GameControler");
     gameControler  = GameControler.GetComponent <GameControler>();
     tinpan         = GameObject.Find("tinpan");
     animation      = tinpan.GetComponent <CharaAnimation>();
     spriteRenderer = this.gameObject.GetComponent <SpriteRenderer>();
     note           = GameObject.Find("PartyNote");
     noteFrequency  = note.GetComponent <NoteFrequency>();
 }
Esempio n. 15
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;
    }
Esempio n. 16
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;
    }
    // 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;
    }
    // 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);
    }
Esempio n. 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);
 }
Esempio n. 20
0
 // Use this for initialization
 void Start()
 {
     status = GetComponent<CharacterStatus>();
     charaAnimation = GetComponent<CharaAnimation>();
     characterMove = GetComponent<CharacterMove>();
     gameRuleCtrl = FindObjectOfType<GameRuleCtrl>();
     // 초기 위치를 저장한다.
     basePosition = transform.position;
     // 대기 시간.
     waitTime = waitBaseTime;
 }
Esempio n. 21
0
 // Use this for initialization
 void Start()
 {
     status = GetComponent<CharacterStatus>();
     charaAnimation = GetComponent<CharaAnimation>();
     characterMove = GetComponent<CharacterMove>();
     // 초기 위치를 저장한다.
     basePosition = transform.position;
     // 대기 시간.
     waitTime = waitBaseTime;
 }