mirror of
https://github.com/smyalygames/monopoly.git
synced 2025-05-18 14:24:12 +02:00
Started to create the class for properties.
This commit is contained in:
parent
9042c76168
commit
fe81f5a6a8
33
Assets/board.cs
Normal file
33
Assets/board.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class board : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
public class Board //Creating the class for the board mechanics.
|
||||||
|
{
|
||||||
|
public int houses; //Initialising houses
|
||||||
|
public int hotels; //Initialising hotels
|
||||||
|
|
||||||
|
public Board()
|
||||||
|
{
|
||||||
|
houses = 32; //Defining the amount of houses - They have a finite amount
|
||||||
|
hotels = 12; //Defining the amount of hotels - They have a finite amount
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
11
Assets/board.cs.meta
Normal file
11
Assets/board.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d799e8e3a27dfe948be91afe90af4cad
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
47
Assets/properties.cs
Normal file
47
Assets/properties.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class NewBehaviourScript : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
public class Property
|
||||||
|
{
|
||||||
|
public string title; //The name of the property.
|
||||||
|
public string group; //The colour, station or utility.
|
||||||
|
public int value; //How much it costs to buy.
|
||||||
|
public int houseCost; //How much it costs to buy a house on that property.
|
||||||
|
public int houses = 0; //How many houses it has. (Can have up to 4)
|
||||||
|
public bool hotel = false; //Whether it has a hotel or not. (Can only have 1)
|
||||||
|
public bool mortgage = false; //Whether the property has been mortgaged.
|
||||||
|
|
||||||
|
public Property(string name, string importGroup, int importValue, int house) //For houses.
|
||||||
|
{
|
||||||
|
//Initialising all the variables.
|
||||||
|
title = name;
|
||||||
|
group = importGroup;
|
||||||
|
value = importValue;
|
||||||
|
houseCost = house;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Property(string name, string importGroup, int importValue) //For stations or utility.
|
||||||
|
{
|
||||||
|
//Initialising all the variables.
|
||||||
|
title = name;
|
||||||
|
group = importGroup;
|
||||||
|
value = importValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
11
Assets/properties.cs.meta
Normal file
11
Assets/properties.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ede8e3ed967bcfe42886d342fcf3d755
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user