init
This commit is contained in:
commit
9afd57306d
323 changed files with 204673 additions and 0 deletions
25
Assets/Scripts/Game14/Game14Hexagon.cs
Normal file
25
Assets/Scripts/Game14/Game14Hexagon.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Game14Hexagon : MonoBehaviour{
|
||||
|
||||
public Rigidbody2D rb2d;
|
||||
|
||||
public float shrinkSpeed = 3f;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start(){
|
||||
rb2d.rotation = Random.Range(0f, 360f);
|
||||
transform.localScale = Vector3.one * 10f;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
transform.localScale -= Vector3.one * shrinkSpeed * Time.deltaTime;
|
||||
|
||||
if(transform.localScale.x <= .05f){
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue