Archion
Archion
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
just learn c# firstttttt and i may help
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
this probably better
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
also duh
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
using UnityEngine;

public class TopDownPlayerMovement : MonoBehaviour
{
public float moveSpeed = 5f;

private Vector2 moveInput;
private Vector2 movement;

void Update()
{
moveInput.x = Input.GetAxisRaw("Horizontal");
moveInput.y = Input.GetAxisRaw("Vertical");
if (moveInput.magnitude > 1)
{
moveInput.Normalize();
}

movement = moveInput * moveSpeed;

transform.Translate(movement * Time.deltaTime, Space.World);
}
}
using UnityEngine;

public class TopDownPlayerMovement : MonoBehaviour
{
public float moveSpeed = 5f;

private Vector2 moveInput;
private Vector2 movement;

void Update()
{
moveInput.x = Input.GetAxisRaw("Horizontal");
moveInput.y = Input.GetAxisRaw("Vertical");
if (moveInput.magnitude > 1)
{
moveInput.Normalize();
}

movement = moveInput * moveSpeed;

transform.Translate(movement * Time.deltaTime, Space.World);
}
}
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
or be an old man like me and play with w3school
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
microsoft
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
👍
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
AD and WS should be in comment probably?
55 replies
CC#
Created by Izsák on 12/11/2024 in #help
hello everyone im trying to make a 2d topdown game in unity and the script i wrote isn't working
what is even AD and WS?
55 replies
CC#
Created by Archion on 12/12/2024 in #help
Variable is 0
oh mai god i made my worst mistake
11 replies
CC#
Created by Archion on 12/12/2024 in #help
Variable is 0
le code:
string[] nm = Console.ReadLine().Split(' ');
int n = Convert.ToInt32(nm[0]);
int m = Convert.ToInt32(nm[1]);

int[][] h = new int[n][];

for (int i = 0; i < n; i++){
string[] line = Console.ReadLine().Split(' ');
for (int j = 0;j<line.Length;j++){
h[i] = new int[m];
h[i][j] = Convert.ToInt32(line[j]);
}

}
Console.WriteLine();
int sor=0;
int max=h[0][0];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
if(max < h[i][j]){
sor=i;
max=h[i][j];
}
}
}

int min = h[sor][0];

for (int i = 0; i < m; i++)
{
if(h[sor][i]<min){
min = h[sor][i];
}
}
Console.WriteLine("{0}", min);

int db = 0;
List<int> k = new List<int>();
for (int i = 0; i < m; i++)
{
if(h[sor][i] == min){
db++;
k.Add(i);
}
}
//k=k.Select(x => x+1).ToList();
Console.WriteLine("{0} {1}",db,string.Join(" ",k));
string[] nm = Console.ReadLine().Split(' ');
int n = Convert.ToInt32(nm[0]);
int m = Convert.ToInt32(nm[1]);

int[][] h = new int[n][];

for (int i = 0; i < n; i++){
string[] line = Console.ReadLine().Split(' ');
for (int j = 0;j<line.Length;j++){
h[i] = new int[m];
h[i][j] = Convert.ToInt32(line[j]);
}

}
Console.WriteLine();
int sor=0;
int max=h[0][0];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
if(max < h[i][j]){
sor=i;
max=h[i][j];
}
}
}

int min = h[sor][0];

for (int i = 0; i < m; i++)
{
if(h[sor][i]<min){
min = h[sor][i];
}
}
Console.WriteLine("{0}", min);

int db = 0;
List<int> k = new List<int>();
for (int i = 0; i < m; i++)
{
if(h[sor][i] == min){
db++;
k.Add(i);
}
}
//k=k.Select(x => x+1).ToList();
Console.WriteLine("{0} {1}",db,string.Join(" ",k));
11 replies
CC#
Created by Archion on 12/12/2024 in #help
Variable is 0
input:
3 3
1 2 3
4 5 6
7 8 9
3 3
1 2 3
4 5 6
7 8 9
11 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
don't judge me
69 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
this is what i told to call them
69 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
Its my language brah
69 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
She teaches what she is being told to do
69 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
The system
69 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
Not the teacher
69 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
We musn't use linq because "We didn't learn it"
69 replies
CC#
Created by Archion on 11/21/2024 in #help
C# homework
Um actually 🤓
69 replies