// 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 //スコアカンストしたりマイナスになっても変にならないように(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; }
// Use this for initialization void Start() { mnybllts = GameObject.Find("nabie").GetComponent <MenyBullets>(); // ggmstr = GameObject.Find("gage").GetComponent <Gagemaster>(); //コンポーネント //yajino = 0; }
// Use this for initialization void Start() { mat = GetComponent <SpriteRenderer>().material; ufocomp = GameObject.Find("ufo").GetComponent <Ufo>(); //ufo コンポーネント ggmstrcomp = GameObject.Find("gage").GetComponent <Gagemaster>(); //ufo コンポーネント }