d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Iso Processing Javascript Help Or Advice Asap > Beginner Stuff
Prev12
Add Reply New Topic New Poll
Member
Posts: 3,939
Joined: Feb 1 2013
Gold: 2,749.09
Warn: 20%
Oct 12 2016 05:31pm
p.s. aloud -> allowed

Quote (Eep @ Oct 12 2016 03:50pm)
don't pretend you write anything cleaner you pleb

you are garbage
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Oct 12 2016 10:26pm
Quote (boxboxbox @ Oct 12 2016 06:31pm)
p.s. aloud -> allowed


you are garbage



glad you didn't refute my statement, at least we are on the same page
Member
Posts: 3,939
Joined: Feb 1 2013
Gold: 2,749.09
Warn: 20%
Oct 12 2016 10:51pm
Quote (Eep @ Oct 12 2016 09:26pm)
glad you didn't refute my statement, at least we are on the same page


Code
Eep.isDumb = true;


doesn't get much cleaner than that
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Oct 13 2016 07:28pm
Quote (boxboxbox @ Oct 12 2016 11:51pm)
Code
Eep.isDumb = true;


doesn't get much cleaner than that


Code
using System;

public class Program
{
public static void Main()
{
IEep eep = null;

_cantCodeForShit(eep);
}

private static void _cantCodeForShit(IEep eep) {
// haha you forgot to assert Eep is not null fucker
eep.isDumb = true;
}
}

public class Eep : IEep
{
private bool _isDumb;

public bool isDumb { get { return _isDumb; } set { _isDumb = value; } }

public bool isCool() {
return true;
}
}

interface IEep {
bool isDumb { get; set; }
bool isCool();
}


This post was edited by Eep on Oct 13 2016 07:29pm
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Oct 13 2016 07:33pm
before anyone talks shit I rarely use C# and no one at my job understands OOP so I don't get to use it very often either
Member
Posts: 6,953
Joined: Sep 27 2003
Gold: 518.50
Oct 14 2016 09:32am
You can have read-only properties in C#.

Code
public bool IsCool { get { return true; } };
Member
Posts: 16,404
Joined: Mar 28 2009
Gold: 7.69
Oct 14 2016 05:18pm
Can someone explain why this doesnt work? Im just trying to get it when the rectangle is clicked the ball moves..

Code
var ty = 0;
var x = 388;
var y = 388;


draw = function() {

background(46, 130, 229);

//button

rect(x, y, -80, -77);

//draw the character

fill(4, 35, 72);

ellipse(200, ty, 60, 60);



//only if the user has clicked on the box should the ball move

if (mouseIsPressed){

if (mouseY > y + x && mouseY < y && mouseX > y + x && mouseX < x){
ty+=1;
}

}

};
Member
Posts: 6,953
Joined: Sep 27 2003
Gold: 518.50
Oct 14 2016 09:04pm
Quote (Shakti @ 14 Oct 2016 17:18)
Can someone explain why this doesnt work? Im just trying to get it when the rectangle is clicked the ball moves..

Code
var ty = 0;
var x = 388;
var y = 388;


draw = function() {

background(46, 130, 229);

//button

rect(x, y, -80, -77);

//draw the character

fill(4, 35, 72);

ellipse(200, ty, 60, 60);



//only if the user has clicked on the box should the ball move

if (mouseIsPressed){

if (mouseY > y + x && mouseY < y && mouseX > y + x && mouseX < x){
ty+=1;
}

}

};

Does mouseIsPressed actually wrok?

This post was edited by ASBands on Oct 14 2016 09:05pm
Member
Posts: 3,939
Joined: Feb 1 2013
Gold: 2,749.09
Warn: 20%
Oct 17 2016 12:01am
Code
why do you post this stuff on here rather than
a) read the documentation for the language you are using
b) insert a few print statements to debug your code
?


in code tags so it doesn't turn my text into fucking emoticons

This post was edited by boxboxbox on Oct 17 2016 12:01am
Go Back To Programming & Development Topic List
Prev12
Add Reply New Topic New Poll