Entries from 2015-06-17 to 1 day

iTween集(2)

iTweenを使ってオブジェクトを揺らす iTween.ShakePosition(hit.transform.gameObject, iTween.Hash("x", 2,"y", 2,"time", 1.0f)); iTween.ShakeRotation(hit.transform.gameObject, iTween.Hash("x", 2,"y", 2,"time", 1.0f)); iTween.ShakeScale(hit.tran…

【Unity】gravityScale, velocity : 動いている物体を停止

物体を停止させる。 重力がある場合は、gravityScaleもゼロにする。 hit.transform.gameObject.GetComponent<Rigidbody2D>().gravityScale = 0; hit.transform.gameObject.GetComponent<Rigidbody2D>().velocity = Vector3.zero; http://www.happytrap.jp/blogs/2012/01/14/6719/www.ha</rigidbody2d></rigidbody2d>…

gameObject.rigidbody2D.AddForce(Vector2.up * 300);

IEnumerator EmptyOpen(){ Parent = CurrentSituation.gameObject.transform.parent.gameObject; if (CurrentSituation.Tag == "Empty") { yield return new WaitForSeconds(0.3f); CurrentSituation.Empty(LevelManager.instance.Level,CurrentSituation.Ch…

多次元配列(三次元配列)

三次元配列、大きい括弧順に要素になっていく。 以下の例だと、8組を持った大きな2括弧が第一要素になり、3組を持った大きな8括弧が第二要素になる。 using UnityEngine; using System.Collections; public class SituationManager : MonoBehaviour { //…