// Use this for initialization void Start() { refObjScoreGUI = GameObject.Find("ScoreGUI"); scrguitexcomp = refObjScoreGUI.GetComponent <ScoreGUITexture>();//コンポーネント cnt = 0; num = 0; tex = scrguitexcomp.numtex; }
// Use this for initialization void Start() { refObjScoreGUI = GameObject.Find("ScoreGUI"); scrguitexcomp = refObjScoreGUI.GetComponent <ScoreGUITexture>();//コンポーネント tex = scrguitexcomp.optintex; //Texture2DからSpriteを作成 sprite = Sprite.Create( texture: tex, rect: new Rect(0, 13 * Const.CO.FONTPY, 48, Const.CO.FONTPY), pivot: new Vector2(0.5f, 0.5f) ); GetComponent <SpriteRenderer>().sprite = sprite; }
// Use this for initialization void Start() { scrguitexcomp = GameObject.Find("ScoreGUI").GetComponent <ScoreGUITexture>(); //コンポーネント ggmstrcomp = GameObject.Find("gage").GetComponent <Gagemaster>(); //コンポーネント tex = scrguitexcomp.optintex; //Texture2DからSpriteを作成 sprite = Sprite.Create( texture: tex, rect: new Rect(0, 12 * Const.CO.FONTPY, 480, Const.CO.FONTPY), pivot: new Vector2(0.5f, 0.5f) ); GetComponent <SpriteRenderer>().sprite = sprite; transform.localScale = new Vector3(0.3f, 0.3f, 1.0f); }
// Use this for initialization void Start() { refObjScoreGUI = GameObject.Find("ScoreGUI"); scrguitexcomp = refObjScoreGUI.GetComponent <ScoreGUITexture>();//コンポーネント tex = scrguitexcomp.optintex; //Texture2DからSpriteを作成 sprite = Sprite.Create( texture: tex, rect: new Rect(0, 8 * Const.CO.FONTPY, 152, Const.CO.FONTPY), pivot: new Vector2(0.5f, 0.5f) ); GetComponent <SpriteRenderer>().sprite = sprite; GetComponent <SpriteRenderer>().material.SetVector("_Intensity", new Color(1.0f, 1.0f, 1.0f, 1.0f)); }
// Use this for initialization void Start() { refObjScoreGUI = GameObject.Find("ScoreGUI"); scrguitexcomp = refObjScoreGUI.GetComponent <ScoreGUITexture>(); //コンポーネント stgmngrcomp = GameObject.Find("StageManager").GetComponent <Stagemanager>(); //コンポーネント cnt = 0; diff = 0; tex = scrguitexcomp.normaltex; //Texture2DからSpriteを作成 sprite = Sprite.Create( texture: tex, rect: new Rect(0, (2 - stgmngrcomp.difficulty) * 33, 192, 33), pivot: new Vector2(0.5f, 0.5f) ); GetComponent <SpriteRenderer>().sprite = sprite; }
// Use this for initialization //スコアカンストしたりマイナスになっても変にならないように(num+10)%10にしている void Start() { scrguitexcomp = GameObject.Find("ScoreGUI").GetComponent <ScoreGUITexture>(); //コンポーネント ggmstrcomp = GameObject.Find("gage").GetComponent <Gagemaster>(); //コンポーネント cnt = 0; prenum = -1; num = 0; tex = scrguitexcomp.numtex; sprite = Sprite.Create( texture: tex, rect: new Rect(0, (9 - (num + 10) % 10) * Const.CO.FONTPY, 48, Const.CO.FONTPY), pivot: new Vector2(0.5f, 0.5f) ); GetComponent <SpriteRenderer>().sprite = sprite; Vector3 scale = transform.localScale; scale.x *= 0.4f; scale.y *= 0.4f; transform.localScale = scale; }