mirror of
https://github.com/imperialsushi/gutterball-3.git
synced 2025-06-15 05:07:42 +00:00
Custom Balls and Cosmic Alleys
Strike it big with amazing bowling action! Everything that made Gutterball 3D a hit is here - incredible 3D graphics, cool ball-rolling controls, hilarious characters - and more! Eight all-new alleys are waxed and ready for you to toss your choice of 85 unique bowling balls. As you play, earn points and cash and unlock alleys and balls. Even customize a ball with your own settings and images! Addictive bowling fun that will bowl you over!
This commit is contained in:
parent
06689843a0
commit
0b195a0fc1
11880 changed files with 728896 additions and 0 deletions
35
Gutterball 3/Assets/Scripts/AnimatedWater.cs
Normal file
35
Gutterball 3/Assets/Scripts/AnimatedWater.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AnimatedWater : MonoBehaviour
|
||||
{
|
||||
public int rendererCounts;
|
||||
public float speedX = 0.1f;
|
||||
public float speedY = 0.1f;
|
||||
public bool is2Renderer;
|
||||
private float curX;
|
||||
private float curY;
|
||||
|
||||
// Use this for initialization
|
||||
void Start ()
|
||||
{
|
||||
curX = GetComponent<Renderer>().material.mainTextureOffset.x;
|
||||
curY = GetComponent<Renderer>().material.mainTextureOffset.y;
|
||||
}
|
||||
|
||||
void FixedUpdate ()
|
||||
{
|
||||
curX += Time.deltaTime * speedX;
|
||||
curY += Time.deltaTime * speedY;
|
||||
if (is2Renderer)
|
||||
{
|
||||
GetComponent<Renderer>().materials[1].SetTextureOffset("_MainTex", new Vector2(curX, curY));
|
||||
GetComponent<Renderer>().materials[8].SetTextureOffset("_MainTex", new Vector2(curX, curY));
|
||||
}
|
||||
else
|
||||
{
|
||||
GetComponent<Renderer>().materials[rendererCounts].SetTextureOffset("_MainTex", new Vector2(curX, curY));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue