Added first tiles, TileController
This commit is contained in:
parent
ca0718d286
commit
84c1b1f2df
13 changed files with 556 additions and 4 deletions
24
Assets/Scripts/GrassTile.cs
Normal file
24
Assets/Scripts/GrassTile.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GrassTile : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
Debug.Log("Created");
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
Debug.Log("Clicked");
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/GrassTile.cs.meta
Normal file
11
Assets/Scripts/GrassTile.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9a992c82c9da0cd4f8759894ddfd5fb3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
25
Assets/Scripts/TileController.cs
Normal file
25
Assets/Scripts/TileController.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TileController : MonoBehaviour
|
||||
{
|
||||
public GameObject tile;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
for (int x = 0; x < 10; x++)
|
||||
{
|
||||
for (int y = 0; y < 10; y++)
|
||||
{
|
||||
//Instantiate(tile, new Vector3(x, y, 0), Quaternion.identity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/TileController.cs.meta
Normal file
11
Assets/Scripts/TileController.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 53e4cfe156bc8c4458f719983afdc204
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue