Unityクリエイターズ勉強会【2/2】【関西】発表資料

  • View
    2.480

  • Download
    0

Embed Size (px)

DESCRIPTION

https://dl.dropbox.com/u/37779475/20130130UniBen/Desktop.html GoogleDrive https://docs.google.com/presentation/d/1fA7KhnVIC6F08CURKqXnrv_Z5p30K5wBj5ddFiVVayY/edit?pli=1#slide=id.g9aaefe24_089

Transcript

  • 2D
  • @mkd21422JavaScriptARUnity1
  • Twitter30Node.js+MongoDB+DropBox @yanotasu
  • Particle
  • Particle
  • Particle Emission Start Shape Simulation Space
  • EmissionEmission --- RateBurst
  • ShapeShape --- ShapeRadius,AngleRandomDirectionEmitFromShell
  • ShapeShape --- EmitFromShellTrueFalse
  • StartStart --- StartLifeTimeStartSpeed()StartSize
  • Simulation SpaceSimulationSpace --- ParticleSystem Local World
  • Emission Start Shape Simulation Space
  • (Player)(Charging)(Charged)(Bullet)(DeadPlayer)(Enemy)(DeadEnemy)
  • 7
  • (Player)StartLifeTime -> 0.1StartSpeed -> 0SimulationSpace -> WorldRate -> 1000Shape ->
  • (Charging)StartLifeTime -> 0.5StartSpeed -> -10Shape -> SphereRadius -> 5EmitFromShell ->True
  • (Charged)Rotation X -> 0StartLifeTime -> 0.8StartSpeed -> 0StartSize -> 0.3SimulationSpace -> WorldRate -> 100Shape ->
  • (Bullet)StartLifeTime -> 0.05StartSpeed -> 0StartSize -> 0.8SimulationSpace -> WorldRate -> 100Shape ->
  • (DeadPlayer)Looping -> falseStartSpeed -> 15Rate -> 0Time Particles -> 0.00 100 -> 0.50 100 -> 1.00 100Shape -> Sphere
  • (Enemy)StartLifeTime -> 0.1StartSpeed -> 0StartColor -> RedSimulation Space -> WorldRate -> 1000Shape ->
  • (DeadEnemy)Looping -> falseStartSpeed -> 15StartColor -> RedRate -> 0Time Particles -> 0.00 100Shape -> Sphere
  • Player()Bullet()Enemy()SphereColliderRigidbody
  • PlayerUse Gravity -> falseFreezePositionZ -> trueFreezeRotationXYZ -> trueCenter -> 0 0 0Radius -> 0.3
  • EnemyUse Gravity -> falseFreezePositionZ -> trueFreezeRotationXYZ -> trueisTrigger -> trueCenter -> 0 0 0Radius -> 0.5
  • BulletUse Gravity -> falseFreezePositionZ -> trueFreezeRotationXYZ -> trueCenter -> 0 0 0Radius -> 0.5
  • 2DOrthographicPosition XYZ -> 0 1 -10Background -> BlackProjection -> OrthographicSize -> 5
  • Script
  • PlayerPlayer(Move)(Charge)(Shoot)(Dead)PlayerController.jsPlayer
  • PlayerController.jsfunction Update () { Move();}function Move(){ var mouse = Input.mousePosition; var pos = Camera.mainCamera.ScreenToWorldPoint(mouse); pos.z = 0; transform.position = pos;}
  • PlayerController.js//var mouse = Input.mousePosition;//var pos = Camera.mainCamera.ScreenToWorldPoint(mouse);//Z-100pos.z = 0;//transform.position = pos;
  • PlayerController.js//var mouse = Input.mousePosition;//var pos = Camera.mainCamera.ScreenToWorldPoint(mouse);//Z-100pos.z = 0;//transform.position = pos;**Orthographic
  • ChargingChargedPlayer
  • ChargingChargedPlayerPosition(0,0,0)
  • PlayerController.jsvar chargedObj:GameObject;var chargingObj:GameObject;function Charge(){ if(Input.GetButton("Fire1")){ chargingObj.SetActive(true); }else if(Input.GetButton("Fire1")){ chargingObj.SetActive(false); }}
  • Charge(PlayerController.js)function Start () { chargingObj.SetActive(false); chargedObj.SetActive(false);}function Update () { Move(); Charge();}
  • ScriptObjectPlayerChargedCharged ObjNonePlayerChargingCharging ObjNone
  • Charge//Trueif(Input.GetButton("Fire1")){ //chargingObj() chargingObj.SetActive(true);//True}else if(Input.GetButton("Fire1")){ //chargingObj chargingObj.SetActive(false);}
  • Charge(PlayerController.js)private var time : float = 0.0;function Charge(){ time+=Time.deltaTime; if(Input.GetButton("Fire1")){ if(time