Beispiel #1
0
 void Start()
 {
     if (instance == null)
     {
         IninHeroData(1);
         instance = this;
     }
 }
Beispiel #2
0
 public Hero(string name, bool isRanged, bool hasLegs, HeroAttribute attribute, params HeroRole[] roles)
 {
     Name = name;
     IsRanged = isRanged;
     HasLegs = hasLegs;
     Attribute = attribute;
     Roles = roles;
 }
Beispiel #3
0
    //public double armer; -> 추가 예정
    //public double castTime; -> 추가 예정

    //방어력
    //공격력
    //스킬 데미지
    //이동 속도
    //공격 속도
    //활성화 속도

    /* 각 객체에 변수들 전달 */
    public void Awake()
    {
        hero      = new Hero(heros, out maxHP, out damage, out moveForce, out jumpForce, out maxShield, out maxEnergy, out recShield, out recEnergy, out defensivePower, out horizontalAcceleration, out verticalAcceleration);
        curHP     = maxHP;
        curShield = maxShield;
        curEnergy = maxEnergy;

        heroAttribute = GetComponent <HeroAttribute>();
        cal           = new CalculateAttribute(heroAttribute);
    }
Beispiel #4
0
    /* 윤동준 필드 */

    // *이곳에 쓸 필드를 정의*

    /* 여기 영역 까지*/
    #endregion


    public PlayerController(HeroAttribute hero, ArcanePhsics arcane) //인스턴스 넘겨줄거 생성자에 저장
    {
        playerMass    = 1.0f;
        playerGravity = 1.0f;
        maxVelocity   = 0.15f;

        gravityVelocity = 9.8f;

        sinThirty = Mathf.Sin(30.0f * Mathf.Deg2Rad);

        nomalForce  = 2f;
        nomalVertex = nomalForce * sinThirty * (0.102f + Mathf.Epsilon);

        specialForce  = 7f;
        specialVertex = specialForce * sinThirty * (0.102f + Mathf.Epsilon);

        plusDir  = +1;
        minusDir = -1;

        defaultMoving += DefaultMove;

        nomalHit1  += NomalAttack1Knock;
        nomalHit2  += NomalAttack2Knock;
        nomalHit3  += NomalAttack3Knock;
        specialHit += SpecialAttackKnock;

        this.hero       = hero;
        correctionValue = 0.4f;

        this.arcane = arcane;
        #region YDJ Constructer
        /* 이곳 밑에서부터 주석 영역까지 생성자 초기화할 부분 윤동준 */

        //   *이곳에서 초기화*

        /*  */
        #endregion
    }
Beispiel #5
0
 public static HeroAttribute ConvertHeroAttribute(int i)
 {
     return(HeroAttribute.GetHeroAttribute(i));
 }
Beispiel #6
0
    /* 이곳부터 필드 작성 윤동준*/

    //필드 작성 부분

    /* 여기까지 */
    #endregion

    #region private Unity Method
    /* 메소드 */
    void Awake()
    {
        hero             = GetComponent <HeroAttribute>();
        arcane           = GetComponent <ArcanePhsics>();
        playerController = new PlayerController(hero, arcane); // 인스턴스 생성자에 넘겨줄꺼 이곳에 차곡차곡 매개변수 할당하기
    }
Beispiel #7
0
    public CalculateAttribute(HeroAttribute hero)
    {
        this.hero = hero;

        hero.Hero_HP += HealthDown;
    }