コード例 #1
0
ファイル: BallBehaviour.cs プロジェクト: hanjo77/breaker
 // Use this for initialization
 void Start()
 {
     myRenderer   = GetComponent <Renderer> ();
     gameInstance = GetComponentInParent <BreakerBehaviour> ();
     bat          = GameObject.FindGameObjectsWithTag("Bat")[0].GetComponent <BatBehaviour>();
     lastUpdate   = Time.fixedTime;
     Reset();
 }
コード例 #2
0
ファイル: WarpBehaviour.cs プロジェクト: hanjo77/breaker
    void OnTriggerEnter(Collider col)
    {
        BallBehaviour    ball = col.gameObject.GetComponent <BallBehaviour> ();
        BreakerBehaviour game = GetComponentInParent <BreakerBehaviour> ();

        if (ball != null && game != null)
        {
            game.isWarping = isWarpEntry;
        }
    }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        ResetScale();

        joyStick = GameObject.FindGameObjectWithTag("Joystick").GetComponent <FloatingJoystick>();
        joyStick.gameObject.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, Screen.width);
        joyStick.gameObject.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, Screen.height);

        gameInstance = GameObject.Find("playground").GetComponent <BreakerBehaviour>();

        otherBat = GameObject.Instantiate(otherBat);
        otherBat.transform.SetParent(transform);
        otherBat.transform.localPosition = new Vector3(0, this.minimalBatGap, 0);
    }
コード例 #4
0
ファイル: BrickBehaviour.cs プロジェクト: hanjo77/breaker
 // Use this for initialization
 void Start()
 {
     gameInstance = GetComponentInParent <BreakerBehaviour> ();
 }