public void FlyPoints(int deltascore) { FlyingPoint fp = pointPrefab.Spawn(); fp.SetStartingPoint(gameObject.transform.position); fp.SetScore(deltascore); fp.transform.rotation = pointPrefab.transform.rotation; }
protected override void Start() { emitter = GameObject.Find("BeatEmitter").GetComponent("Emitter") as Emitter; emitter.FollowBeat(gameObject.transform.position); Config config = GameObject.Find("Config").GetComponent("Config") as Config; pointPrefab = config.pointPrefab; roll = this.GetComponentInChildren <Animation>(); roll ["C4D Animation Take"].speed = 3f; maxCombo = 0; catchedBeats = 0; transitionTotalTime = 0.10f; }
public static GameObject CreateFlyingAction(FlyingPoint point) { var nodeID = point.GetComponentsInChildren <FlyingAction>().Length + 1; //var go = new GameObject ("NPC-"+npcId); var go = GameObject.CreatePrimitive(PrimitiveType.Sphere); go.name = "Action-" + nodeID; go.AddComponent <FlyingAction> ().objectId = nodeID;; go.transform.SetParent(point.transform); go.transform.localPosition = Vector3.zero; go.transform.localScale = Vector3.one; go.transform.rotation = Quaternion.identity; Selection.activeGameObject = go; return(go); }