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


    // Use this for initialization
    void Start()
    {
        status         = GetComponent <CharacterStatus>();
        charaAnimation = GetComponent <CharaAnimation>();
        inputManager   = FindObjectOfType <InputManager>();
        gameRuleCtrl   = FindObjectOfType <GameRuleCtrl>();
    }
예제 #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;
    }
예제 #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);
    }
예제 #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);
    }
예제 #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();
 }
예제 #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;
    }
예제 #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;
    }
예제 #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);
 }
예제 #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;
 }
예제 #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>();
    }
예제 #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>();
 }
예제 #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;
    }
예제 #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);
    }
예제 #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);
 }
예제 #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;
 }
예제 #21
0
 // Use this for initialization
 void Start()
 {
     status = GetComponent<CharacterStatus>();
     charaAnimation = GetComponent<CharaAnimation>();
     characterMove = GetComponent<CharacterMove>();
     // 초기 위치를 저장한다.
     basePosition = transform.position;
     // 대기 시간.
     waitTime = waitBaseTime;
 }