Flujo de Script y Operadores
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BehaviourTraining : MonoBehaviour
{
public bool vaALlover = true;
public bool soyMujer = true;
public int edad = 29;
public int dinero = 100;
public bool amigomilloneti = true;
void Awake ()
{
Debug.Log ("La clase esta apunto de despertarse");
}
// Start is called before the first frame update
void Start()
{
Debug.Log ("La clase acaba de iniciar");
if (vaALlover)
{
Debug.Log("Voy a llevar un paraguas");
} else Debug.Log ("No tiene caso,mejor me llevo una coca");
if(!soyMujer)
{
Debug.Log("Soy Hombre");
}else
{
Debug.Log("SoyMujer");
}
if ((edad>=18 && dinero>=200) || amigomilloneti) {
Debug.Log("Puedes entrar a la fiesta");
}else {
Debug.Log("Vete a tu casa pobre");
}
}
Comentarios
Publicar un comentario