| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- C언어 달력
- c언어 배열 programming
- 루아다운로드
- for문
- 온라인 비주얼 스튜디오
- c언어 콘서트 배열 2번
- c샾 hello world
- N Queens Problem
- Lua language
- c샾 헬로우 월드
- N Queen 문제
- Lua 설명
- Lua란
- c sharp hello world
- 루아
- c언어 버블정렬
- 비주얼 스튜디오 다운로드
- c언어 최대최소
- 비주얼 스튜디오
- 유니티
- c언어 콘서트 배열
- 2중 반복문
- 메이플스토리
- c#온라인
- lua 다운로드
- LUA
- c++ 등차수열 합
- N Queen Coordinates
- 게임제작
- lua download
Archives
- Today
- Total
Ln Go
BossRock 본문
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BossRock : Bullet
{
Rigidbody rigid;
float angularPower = 2;
float scaleValue = 0.1f;
bool isShoot;
void Awake()
{
rigid = GetComponent<Rigidbody>();
StartCoroutine(GainPowerTimer());
StartCoroutine(GainPower());
}
IEnumerator GainPowerTimer()
{
yield return new WaitForSeconds(2.2f);
isShoot = true;
}
IEnumerator GainPower()
{
while (!isShoot)
{
angularPower += 0.02f;
scaleValue += 0.005f;
transform.localScale = Vector3.one * scaleValue;
rigid.AddTorque(transform.right * angularPower, ForceMode.Acceleration);
//While문에는 꼭 yield return null 포함
yield return null;
}
}
}
'Unity > Quad Action' 카테고리의 다른 글
| Weapon (0) | 2021.06.04 |
|---|---|
| BossMissile (0) | 2021.06.04 |
| Boss (0) | 2021.06.04 |
| Enemy (0) | 2021.06.04 |
| Player (0) | 2021.06.04 |
Comments